summaryrefslogtreecommitdiff
path: root/udev_rules.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-03-29 03:56:42 +0200
committerGreg KH <gregkh@suse.de>2005-04-26 23:55:00 -0700
commit584d412bf0584704dc93a7a7595e273c15b3e457 (patch)
treef0e2e568bdfea9bc241ea96113fc9d32bfffefcb /udev_rules.c
parent12340f41085c5ab9f5f049eab640835e39de8286 (diff)
[PATCH] correct error path for PROGRAM execution
Diffstat (limited to 'udev_rules.c')
-rw-r--r--udev_rules.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/udev_rules.c b/udev_rules.c
index c07abb9be0..9a0ee833e2 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -415,11 +415,13 @@ static int execute_program(struct udevice *udev, const char *path, char *value,
dup2(fds[1], STDOUT_FILENO);
retval = execv(arg, argv);
- info(KEY_PROGRAM " execution of '%s' failed", path);
- exit(1);
+ err(KEY_PROGRAM " execution of '%s' failed", path);
+ retval = -1;
+ break;
case -1:
err("fork of '%s' failed", path);
- return -1;
+ retval = -1;
+ break;
default:
/* parent reads from fds[0] */
close(fds[1]);