92 |
OPT_2 = (1 << 20) * ENABLE_CHPST, |
OPT_2 = (1 << 20) * ENABLE_CHPST, |
93 |
}; |
}; |
94 |
|
|
95 |
static void edir(const char *directory_name) |
/* TODO: use recursive_action? */ |
96 |
|
static NOINLINE void edir(const char *directory_name) |
97 |
{ |
{ |
98 |
int wdir; |
int wdir; |
99 |
DIR *dir; |
DIR *dir; |
102 |
|
|
103 |
wdir = xopen(".", O_RDONLY | O_NDELAY); |
wdir = xopen(".", O_RDONLY | O_NDELAY); |
104 |
xchdir(directory_name); |
xchdir(directory_name); |
105 |
dir = opendir("."); |
dir = xopendir("."); |
|
if (!dir) |
|
|
bb_perror_msg_and_die("opendir %s", directory_name); |
|
106 |
for (;;) { |
for (;;) { |
107 |
char buf[256]; |
char buf[256]; |
108 |
char *tail; |
char *tail; |
199 |
// if yes -> getopt converts strings to numbers for us |
// if yes -> getopt converts strings to numbers for us |
200 |
opt_complementary = "-1:a+:c+:d+:f+:l+:m+:o+:p+:r+:s+:t+"; |
opt_complementary = "-1:a+:c+:d+:f+:l+:m+:o+:p+:r+:s+:t+"; |
201 |
opt = getopt32(argv, "+a:c:d:f:l:m:o:p:r:s:t:u:U:e:" |
opt = getopt32(argv, "+a:c:d:f:l:m:o:p:r:s:t:u:U:e:" |
202 |
USE_CHPST("/:n:vP012"), |
IF_CHPST("/:n:vP012"), |
203 |
&limita, &limitc, &limitd, &limitf, &limitl, |
&limita, &limitc, &limitd, &limitf, &limitl, |
204 |
&limitm, &limito, &limitp, &limitr, &limits, &limitt, |
&limitm, &limito, &limitp, &limitr, &limits, &limitt, |
205 |
&set_user, &env_user, &env_dir |
&set_user, &env_user, &env_dir |
206 |
USE_CHPST(, &root, &nicestr)); |
IF_CHPST(, &root, &nicestr)); |
207 |
argv += optind; |
argv += optind; |
208 |
if (opt & OPT_m) { // -m means -asld |
if (opt & OPT_m) { // -m means -asld |
209 |
limita = limits = limitl = limitd = limitm; |
limita = limits = limitl = limitd = limitm; |