aboutsummaryrefslogtreecommitdiff
path: root/coreutils/mknod.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 12:49:22 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 12:49:22 +0000
commit1385899416a4396385ad421ae1f532be7103738a (patch)
treefc4d14a910593d1235318bb36abe5e9f72d2039e /coreutils/mknod.c
parent5625415085e68ac5e150f54e685417c866620d76 (diff)
downloadbusybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.gz
busybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.bz2
busybox-w32-1385899416a4396385ad421ae1f532be7103738a.zip
attempt to regularize atoi mess.
Diffstat (limited to 'coreutils/mknod.c')
-rw-r--r--coreutils/mknod.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index 9c97b0302..7cc478f17 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -9,11 +9,8 @@
9 9
10/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ 10/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
11 11
12#include <stdlib.h>
13#include <string.h>
14#include <sys/stat.h>
15#include <sys/sysmacros.h> // For makedev 12#include <sys/sysmacros.h> // For makedev
16#include <unistd.h> 13
17#include "busybox.h" 14#include "busybox.h"
18#include "libcoreutils/coreutils.h" 15#include "libcoreutils/coreutils.h"
19 16
@@ -37,8 +34,8 @@ int mknod_main(int argc, char **argv)
37 if ((*name != 'p') && ((argc -= 2) == 2)) { 34 if ((*name != 'p') && ((argc -= 2) == 2)) {
38 /* Autodetect what the system supports; thexe macros should 35 /* Autodetect what the system supports; thexe macros should
39 * optimize out to two constants. */ 36 * optimize out to two constants. */
40 dev = makedev(bb_xgetularg10_bnd(argv[2], 0, major(UINT_MAX)), 37 dev = makedev(xatoul_range(argv[2], 0, major(UINT_MAX)),
41 bb_xgetularg10_bnd(argv[3], 0, minor(UINT_MAX))); 38 xatoul_range(argv[3], 0, minor(UINT_MAX)));
42 } 39 }
43 40
44 if (argc == 2) { 41 if (argc == 2) {