summaryrefslogtreecommitdiff
path: root/coreutils/libcoreutils
diff options
context:
space:
mode:
author"Vladimir N. Oleynik"2005-10-06 15:30:17 +0000
committer"Vladimir N. Oleynik"2005-10-06 15:30:17 +0000
commitb31cb87fdce95d4bde2062e44e7a5408e97985c6 (patch)
tree6cd0675fab23af6c4651802a59d81e3074e14690 /coreutils/libcoreutils
parentba248206fe50b4b905e220cdb68f4959593c17e7 (diff)
downloadbusybox-b31cb87fdce95d4bde2062e44e7a5408e97985c6.zip
busybox-b31cb87fdce95d4bde2062e44e7a5408e97985c6.tar.gz
to bb_getopt_ulflags()
Diffstat (limited to 'coreutils/libcoreutils')
-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 0872bdc..7e54fed 100644
--- a/coreutils/libcoreutils/getopt_mk_fifo_nod.c
+++ b/coreutils/libcoreutils/getopt_mk_fifo_nod.c
@@ -29,17 +29,12 @@
extern mode_t getopt_mk_fifo_nod(int argc, char **argv)
{
mode_t mode = 0666;
- int opt;
+ char *smode = NULL;
- while ((opt = getopt(argc, argv, "m:")) > 0) {
- if (opt == 'm') {
- mode = 0666;
- if (bb_parse_mode(optarg, &mode)) {
- umask(0);
- continue;
- }
- }
- bb_show_usage();
+ bb_getopt_ulflags(argc, argv, "m:", &smode);
+ if(smode) {
+ if (bb_parse_mode(smode, &mode))
+ umask(0);
}
return mode;
}