From b31cb87fdce95d4bde2062e44e7a5408e97985c6 Mon Sep 17 00:00:00 2001 From: "Vladimir N. Oleynik" Date: Thu, 6 Oct 2005 15:30:17 +0000 Subject: to bb_getopt_ulflags() --- coreutils/libcoreutils/getopt_mk_fifo_nod.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'coreutils/libcoreutils') 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; } -- cgit v1.1