diff options
author | Bernhard Reutner-Fischer | 2006-04-12 18:39:58 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2006-04-12 18:39:58 +0000 |
commit | d9cf7ac781c1274d6d23fa5674b6b90baaf4cf61 (patch) | |
tree | c7e395cfe1eafcd601bc16e0231fc30f8789e4d9 /miscutils/makedevs.c | |
parent | 67f641e75b685abe1588b634b409c1ee2ff68c22 (diff) | |
download | busybox-d9cf7ac781c1274d6d23fa5674b6b90baaf4cf61.zip busybox-d9cf7ac781c1274d6d23fa5674b6b90baaf4cf61.tar.gz |
- patch from Denis Vlasenko to add and use bb_xchdir()
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 999b993..24d07eb 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c @@ -1,4 +1,11 @@ /* vi: set sw=4 ts=4: */ +/* + * public domain -- Dave 'Kill a Cop' Cinege <dcinege@psychosis.com> + * + * makedevs + * Make ranges of device files quickly. + * known bugs: can't deal with alpha ranges + */ #include <stdio.h> #include <stdlib.h> @@ -12,13 +19,6 @@ #include "busybox.h" #ifdef CONFIG_FEATURE_MAKEDEVS_LEAF -/* - * public domain -- Dave 'Kill a Cop' Cinege <dcinege@psychosis.com> - * - * makedevs - * Make ranges of device files quickly. - * known bugs: can't deal with alpha ranges - */ int makedevs_main(int argc, char **argv) { mode_t mode; @@ -94,9 +94,7 @@ int makedevs_main(int argc, char **argv) bb_error_msg_and_die("root directory not specified"); } - if (chdir(rootdir) != 0) { - bb_perror_msg_and_die("could not chdir to %s", rootdir); - } + bb_xchdir(rootdir); umask(0); |