diff options
author | vodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-10-06 15:30:17 +0000 |
---|---|---|
committer | vodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-10-06 15:30:17 +0000 |
commit | 18c5544ad99fde3af59ac8b4ca690cf27c952d2b (patch) | |
tree | 6cd0675fab23af6c4651802a59d81e3074e14690 | |
parent | 958cf940516b45524fd1be2a25736795f7892e3f (diff) | |
download | busybox-w32-18c5544ad99fde3af59ac8b4ca690cf27c952d2b.tar.gz busybox-w32-18c5544ad99fde3af59ac8b4ca690cf27c952d2b.tar.bz2 busybox-w32-18c5544ad99fde3af59ac8b4ca690cf27c952d2b.zip |
to bb_getopt_ulflags()
git-svn-id: svn://busybox.net/trunk/busybox@11792 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | coreutils/libcoreutils/getopt_mk_fifo_nod.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/coreutils/libcoreutils/getopt_mk_fifo_nod.c b/coreutils/libcoreutils/getopt_mk_fifo_nod.c index 0872bdcf0..7e54fed3e 100644 --- a/coreutils/libcoreutils/getopt_mk_fifo_nod.c +++ b/coreutils/libcoreutils/getopt_mk_fifo_nod.c | |||
@@ -29,17 +29,12 @@ | |||
29 | extern mode_t getopt_mk_fifo_nod(int argc, char **argv) | 29 | extern mode_t getopt_mk_fifo_nod(int argc, char **argv) |
30 | { | 30 | { |
31 | mode_t mode = 0666; | 31 | mode_t mode = 0666; |
32 | int opt; | 32 | char *smode = NULL; |
33 | 33 | ||
34 | while ((opt = getopt(argc, argv, "m:")) > 0) { | 34 | bb_getopt_ulflags(argc, argv, "m:", &smode); |
35 | if (opt == 'm') { | 35 | if(smode) { |
36 | mode = 0666; | 36 | if (bb_parse_mode(smode, &mode)) |
37 | if (bb_parse_mode(optarg, &mode)) { | 37 | umask(0); |
38 | umask(0); | ||
39 | continue; | ||
40 | } | ||
41 | } | ||
42 | bb_show_usage(); | ||
43 | } | 38 | } |
44 | return mode; | 39 | return mode; |
45 | } | 40 | } |