*: mass renaming of USE_XXXX to IF_XXXX

and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
This commit is contained in:
Denis Vlasenko
2009-04-21 11:09:40 +00:00
parent 8b814b4a34
commit 5e34ff29bc
102 changed files with 1312 additions and 1308 deletions

View File

@@ -24,7 +24,7 @@ int insmod_main(int argc UNUSED_PARAM, char **argv)
* or in $MODPATH.
*/
USE_FEATURE_2_4_MODULES(
IF_FEATURE_2_4_MODULES(
getopt32(argv, INSMOD_OPTS INSMOD_ARGS);
argv += optind - 1;
);

View File

@@ -679,7 +679,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
{
struct utsname uts;
char applet0 = applet_name[0];
USE_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(char *options;)
IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(char *options;)
/* are we lsmod? -> just dump /proc/modules */
if ('l' == applet0) {
@@ -773,8 +773,8 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
len = MAXINT(ssize_t);
map = xmalloc_xopen_read_close(*argv, &len);
if (init_module(map, len,
USE_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(options ? options : "")
SKIP_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE("")
IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(options ? options : "")
IF_NOT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE("")
) != 0)
bb_error_msg_and_die("can't insert '%s': %s",
*argv, moderror(errno));
@@ -791,7 +791,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
} while (*argv);
if (ENABLE_FEATURE_CLEAN_UP) {
USE_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(free(options);)
IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(free(options);)
}
return EXIT_SUCCESS;
}

View File

@@ -33,7 +33,7 @@ struct module_entry { /* I'll call it ME. */
llist_t *deps; /* strings. modules we depend on */
};
#define MODPROBE_OPTS "acdlnrt:VC:" USE_FEATURE_MODPROBE_BLACKLIST("b")
#define MODPROBE_OPTS "acdlnrt:VC:" IF_FEATURE_MODPROBE_BLACKLIST("b")
enum {
MODPROBE_OPT_INSERT_ALL = (INSMOD_OPT_UNUSED << 0), /* a */
MODPROBE_OPT_DUMP_ONLY = (INSMOD_OPT_UNUSED << 1), /* c */

View File

@@ -26,10 +26,10 @@ char *parse_cmdline_module_options(char **argv) FAST_FUNC;
#define INSMOD_OPTS \
"vq" \
USE_FEATURE_2_4_MODULES("sLo:fkx") \
USE_FEATURE_INSMOD_LOAD_MAP("m")
IF_FEATURE_2_4_MODULES("sLo:fkx") \
IF_FEATURE_INSMOD_LOAD_MAP("m")
#define INSMOD_ARGS USE_FEATURE_2_4_MODULES(, NULL)
#define INSMOD_ARGS IF_FEATURE_2_4_MODULES(, NULL)
enum {
INSMOD_OPT_VERBOSE = 0x0001,