Changeset 1765 in MondoRescue for branches/2.2.5/mindi-busybox/coreutils/libcoreutils
- Timestamp:
- Nov 4, 2007, 3:16:40 AM (18 years ago)
- Location:
- branches/2.2.5/mindi-busybox/coreutils/libcoreutils
- Files:
-
- 1 added
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mindi-busybox/coreutils/libcoreutils/coreutils.h
r821 r1765 1 /* vi: set sw=4 ts=4: */ 1 2 /* 2 3 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. … … 8 9 typedef int (*stat_func)(const char *fn, struct stat *ps); 9 10 10 externint cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf);11 externint cp_mv_stat(const char *fn, struct stat *fn_stat);11 int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf); 12 int cp_mv_stat(const char *fn, struct stat *fn_stat); 12 13 13 externmode_t getopt_mk_fifo_nod(int argc, char **argv);14 mode_t getopt_mk_fifo_nod(int argc, char **argv); 14 15 15 16 #endif -
branches/2.2.5/mindi-busybox/coreutils/libcoreutils/cp_mv_stat.c
r821 r1765 21 21 */ 22 22 23 #include <errno.h>24 #include <sys/stat.h>25 23 #include "libbb.h" 26 24 #include "coreutils.h" … … 30 28 if (sf(fn, fn_stat) < 0) { 31 29 if (errno != ENOENT) { 32 bb_perror_msg(" unable to stat `%s'", fn);30 bb_perror_msg("cannot stat '%s'", fn); 33 31 return -1; 34 32 } -
branches/2.2.5/mindi-busybox/coreutils/libcoreutils/getopt_mk_fifo_nod.c
r821 r1765 21 21 */ 22 22 23 #include <sys/types.h>24 #include <sys/stat.h>25 #include <unistd.h>26 23 #include "libbb.h" 27 24 #include "coreutils.h" … … 31 28 mode_t mode = 0666; 32 29 char *smode = NULL; 33 34 bb_getopt_ulflags(argc, argv, "m:", &smode); 35 if(smode) { 30 #if ENABLE_SELINUX 31 security_context_t scontext; 32 #endif 33 int opt; 34 opt = getopt32(argv, "m:" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext)); 35 if (opt & 1) { 36 36 if (bb_parse_mode(smode, &mode)) 37 37 umask(0); 38 38 } 39 40 #if ENABLE_SELINUX 41 if (opt & 2) { 42 selinux_or_die(); 43 setfscreatecon_or_die(scontext); 44 } 45 #endif 46 39 47 return mode; 40 48 }
Note:
See TracChangeset
for help on using the changeset viewer.