summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott James Remnant <scott@ubuntu.com>2007-05-16 20:06:39 +0200
committerKay Sievers <kay.sievers@vrfy.org>2007-05-16 20:06:39 +0200
commit8246d00d886fe0968bac065efbc455019483fe4e (patch)
treeddd98ba6f0296a66b0a7af7c8abfc74eb541f57a
parentca4f2c41b016530b5865b40b8dbbf0a3a0e8e634 (diff)
run_program: log "info" not "error" if program is missing
-rw-r--r--udev_utils_run.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/udev_utils_run.c b/udev_utils_run.c
index c9bbc97bad..8137ec1c66 100644
--- a/udev_utils_run.c
+++ b/udev_utils_run.c
@@ -158,9 +158,13 @@ int run_program(const char *command, const char *subsystem,
close(errpipe[WRITE_END]);
}
execv(argv[0], argv);
-
- /* we should never reach this */
- err("exec of program '%s' failed", argv[0]);
+ if ((errno == ENOENT) || (errno = ENOTDIR)) {
+ /* may be on a filesytem which is not mounted right now */
+ info("program '%s' not found", argv[0]);
+ } else {
+ /* other problems */
+ err("exec of program '%s' failed", argv[0]);
+ }
_exit(1);
case -1:
err("fork of '%s' failed: %s", argv[0], strerror(errno));