diff options
Diffstat (limited to 'miscutils/makedevs.c')
-rw-r--r-- | miscutils/makedevs.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index 999b99331..24d07ebe0 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c | |||
@@ -1,4 +1,11 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | ||
3 | * public domain -- Dave 'Kill a Cop' Cinege <dcinege@psychosis.com> | ||
4 | * | ||
5 | * makedevs | ||
6 | * Make ranges of device files quickly. | ||
7 | * known bugs: can't deal with alpha ranges | ||
8 | */ | ||
2 | 9 | ||
3 | #include <stdio.h> | 10 | #include <stdio.h> |
4 | #include <stdlib.h> | 11 | #include <stdlib.h> |
@@ -12,13 +19,6 @@ | |||
12 | #include "busybox.h" | 19 | #include "busybox.h" |
13 | 20 | ||
14 | #ifdef CONFIG_FEATURE_MAKEDEVS_LEAF | 21 | #ifdef CONFIG_FEATURE_MAKEDEVS_LEAF |
15 | /* | ||
16 | * public domain -- Dave 'Kill a Cop' Cinege <dcinege@psychosis.com> | ||
17 | * | ||
18 | * makedevs | ||
19 | * Make ranges of device files quickly. | ||
20 | * known bugs: can't deal with alpha ranges | ||
21 | */ | ||
22 | int makedevs_main(int argc, char **argv) | 22 | int makedevs_main(int argc, char **argv) |
23 | { | 23 | { |
24 | mode_t mode; | 24 | mode_t mode; |
@@ -94,9 +94,7 @@ int makedevs_main(int argc, char **argv) | |||
94 | bb_error_msg_and_die("root directory not specified"); | 94 | bb_error_msg_and_die("root directory not specified"); |
95 | } | 95 | } |
96 | 96 | ||
97 | if (chdir(rootdir) != 0) { | 97 | bb_xchdir(rootdir); |
98 | bb_perror_msg_and_die("could not chdir to %s", rootdir); | ||
99 | } | ||
100 | 98 | ||
101 | umask(0); | 99 | umask(0); |
102 | 100 | ||