function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
49 lines
1.3 KiB
C
49 lines
1.3 KiB
C
/* vi: set sw=4 ts=4: */
|
|
/*
|
|
* coreutils utility routine
|
|
*
|
|
* Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*
|
|
*/
|
|
|
|
#include "libbb.h"
|
|
#include "coreutils.h"
|
|
|
|
mode_t getopt_mk_fifo_nod(char **argv)
|
|
{
|
|
mode_t mode = 0666;
|
|
char *smode = NULL;
|
|
#if ENABLE_SELINUX
|
|
security_context_t scontext;
|
|
#endif
|
|
int opt;
|
|
opt = getopt32(argv, "m:" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext));
|
|
if (opt & 1) {
|
|
if (bb_parse_mode(smode, &mode))
|
|
umask(0);
|
|
}
|
|
|
|
#if ENABLE_SELINUX
|
|
if (opt & 2) {
|
|
selinux_or_die();
|
|
setfscreatecon_or_die(scontext);
|
|
}
|
|
#endif
|
|
|
|
return mode;
|
|
}
|