From 173133414753125e4a5ddf160cd22807a703bd38 Mon Sep 17 00:00:00 2001 From: aldot Date: Wed, 12 Apr 2006 18:39:58 +0000 Subject: - patch from Denis Vlasenko to add and use bb_xchdir() git-svn-id: svn://busybox.net/trunk/busybox@14837 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- miscutils/makedevs.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'miscutils/makedevs.c') 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 @@ /* vi: set sw=4 ts=4: */ +/* + * public domain -- Dave 'Kill a Cop' Cinege + * + * makedevs + * Make ranges of device files quickly. + * known bugs: can't deal with alpha ranges + */ #include #include @@ -12,13 +19,6 @@ #include "busybox.h" #ifdef CONFIG_FEATURE_MAKEDEVS_LEAF -/* - * public domain -- Dave 'Kill a Cop' Cinege - * - * 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); -- cgit v1.2.3-55-g6feb