diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-02 13:17:10 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-02 13:17:10 +0200 |
commit | 5478aaf5b8f9a90ab37d9de89fc893886f9580db (patch) | |
tree | b4f064d3eb528c0e0216ec9708a29804f7a352c5 /util-linux/mdev.c | |
parent | 90db359972643801300d4139025a25e0ba47c278 (diff) | |
download | busybox-w32-5478aaf5b8f9a90ab37d9de89fc893886f9580db.tar.gz busybox-w32-5478aaf5b8f9a90ab37d9de89fc893886f9580db.tar.bz2 busybox-w32-5478aaf5b8f9a90ab37d9de89fc893886f9580db.zip |
mdev: be more permissive on errors (dont die): mdev -s users want that
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rw-r--r-- | util-linux/mdev.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index f9ecf3cd6..2ac15e762 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
@@ -303,8 +303,12 @@ static void make_device(char *path, int delete) | |||
303 | const char *s = "$@*"; | 303 | const char *s = "$@*"; |
304 | const char *s2 = strchr(s, val[0]); | 304 | const char *s2 = strchr(s, val[0]); |
305 | 305 | ||
306 | if (!s2) | 306 | if (!s2) { |
307 | bb_error_msg_and_die("bad line %u", parser->lineno); | 307 | bb_error_msg("bad line %u", parser->lineno); |
308 | if (ENABLE_FEATURE_MDEV_RENAME) | ||
309 | free(alias); | ||
310 | continue; | ||
311 | } | ||
308 | 312 | ||
309 | /* Are we running this command now? | 313 | /* Are we running this command now? |
310 | * Run $cmd on delete, @cmd on create, *cmd on both | 314 | * Run $cmd on delete, @cmd on create, *cmd on both |
@@ -346,7 +350,7 @@ static void make_device(char *path, int delete) | |||
346 | putenv(s); | 350 | putenv(s); |
347 | putenv(s1); | 351 | putenv(s1); |
348 | if (system(command) == -1) | 352 | if (system(command) == -1) |
349 | bb_perror_msg_and_die("can't run '%s'", command); | 353 | bb_perror_msg("can't run '%s'", command); |
350 | unsetenv("SUBSYSTEM"); | 354 | unsetenv("SUBSYSTEM"); |
351 | free(s1); | 355 | free(s1); |
352 | unsetenv("MDEV"); | 356 | unsetenv("MDEV"); |