aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-10-06 15:30:17 +0000
committervodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-10-06 15:30:17 +0000
commit18c5544ad99fde3af59ac8b4ca690cf27c952d2b (patch)
tree6cd0675fab23af6c4651802a59d81e3074e14690
parent958cf940516b45524fd1be2a25736795f7892e3f (diff)
downloadbusybox-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.c15
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 @@
29extern mode_t getopt_mk_fifo_nod(int argc, char **argv) 29extern 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}