--- trunk/mkinitrd-magellan/busybox/runit/chpst.c 2010/04/29 20:38:48 983 +++ trunk/mkinitrd-magellan/busybox/runit/chpst.c 2010/05/30 11:32:42 984 @@ -92,7 +92,8 @@ OPT_2 = (1 << 20) * ENABLE_CHPST, }; -static void edir(const char *directory_name) +/* TODO: use recursive_action? */ +static NOINLINE void edir(const char *directory_name) { int wdir; DIR *dir; @@ -101,9 +102,7 @@ wdir = xopen(".", O_RDONLY | O_NDELAY); xchdir(directory_name); - dir = opendir("."); - if (!dir) - bb_perror_msg_and_die("opendir %s", directory_name); + dir = xopendir("."); for (;;) { char buf[256]; char *tail; @@ -200,11 +199,11 @@ // if yes -> getopt converts strings to numbers for us opt_complementary = "-1:a+:c+:d+:f+:l+:m+:o+:p+:r+:s+:t+"; opt = getopt32(argv, "+a:c:d:f:l:m:o:p:r:s:t:u:U:e:" - USE_CHPST("/:n:vP012"), + IF_CHPST("/:n:vP012"), &limita, &limitc, &limitd, &limitf, &limitl, &limitm, &limito, &limitp, &limitr, &limits, &limitt, &set_user, &env_user, &env_dir - USE_CHPST(, &root, &nicestr)); + IF_CHPST(, &root, &nicestr)); argv += optind; if (opt & OPT_m) { // -m means -asld limita = limits = limitl = limitd = limitm;