to bb_getopt_ulflags()

This commit is contained in:
"Vladimir N. Oleynik" 2005-10-06 15:30:17 +00:00
parent ba248206fe
commit b31cb87fdc

View File

@ -29,17 +29,12 @@
extern mode_t getopt_mk_fifo_nod(int argc, char **argv) extern mode_t getopt_mk_fifo_nod(int argc, char **argv)
{ {
mode_t mode = 0666; mode_t mode = 0666;
int opt; char *smode = NULL;
while ((opt = getopt(argc, argv, "m:")) > 0) { bb_getopt_ulflags(argc, argv, "m:", &smode);
if (opt == 'm') { if(smode) {
mode = 0666; if (bb_parse_mode(smode, &mode))
if (bb_parse_mode(optarg, &mode)) { umask(0);
umask(0);
continue;
}
}
bb_show_usage();
} }
return mode; return mode;
} }