From: Lucas De Marchi Date: Mon, 6 Feb 2012 14:46:39 +0000 (-0200) Subject: libkmod-module: probe: rename flag to be more meaningful X-Git-Tag: v5~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=814a57babfffb62a19ddeceb7949d601f1147fa9;p=platform%2Fupstream%2Fkmod.git libkmod-module: probe: rename flag to be more meaningful --- diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c index 4404224..61cdb4a 100644 --- a/libkmod/libkmod-module.c +++ b/libkmod/libkmod-module.c @@ -1133,7 +1133,7 @@ KMOD_EXPORT int kmod_module_probe_insert_module(struct kmod_module *mod, return -ENOENT; if (module_is_inkernel(mod)) { - if (flags & KMOD_PROBE_STOP_ON_ALREADY_LOADED) + if (flags & KMOD_PROBE_FAIL_ON_LOADED) return -EEXIST; else return 0; @@ -1184,7 +1184,8 @@ KMOD_EXPORT int kmod_module_probe_insert_module(struct kmod_module *mod, err = module_do_install_commands(m, options, &cb); } else { - if (!(flags & KMOD_PROBE_IGNORE_LOADED) && module_is_inkernel(m)) { + if (!(flags & KMOD_PROBE_IGNORE_LOADED) + && module_is_inkernel(m)) { DBG(mod->ctx, "Ignoring module '%s': " "already loaded\n", m->name); err = 0; @@ -1212,7 +1213,7 @@ KMOD_EXPORT int kmod_module_probe_insert_module(struct kmod_module *mod, * insert it. */ if (err == -EEXIST && m == mod && - (flags & KMOD_PROBE_STOP_ON_ALREADY_LOADED)) + (flags & KMOD_PROBE_FAIL_ON_LOADED)) break; if (err == -EEXIST) diff --git a/libkmod/libkmod.h b/libkmod/libkmod.h index 2f7ff7b..6992e77 100644 --- a/libkmod/libkmod.h +++ b/libkmod/libkmod.h @@ -154,7 +154,7 @@ enum kmod_probe { KMOD_PROBE_IGNORE_COMMAND = 0x00004, KMOD_PROBE_IGNORE_LOADED = 0x00008, KMOD_PROBE_DRY_RUN = 0x00010, - KMOD_PROBE_STOP_ON_ALREADY_LOADED = 0x00020, + KMOD_PROBE_FAIL_ON_LOADED = 0x00020, /* codes below can be used in return value, too */ KMOD_PROBE_APPLY_BLACKLIST_ALL = 0x10000, diff --git a/tools/kmod-modprobe.c b/tools/kmod-modprobe.c index 4e9eb30..b94bdf3 100644 --- a/tools/kmod-modprobe.c +++ b/tools/kmod-modprobe.c @@ -578,7 +578,7 @@ static int insmod(struct kmod_ctx *ctx, const char *alias, if (use_blacklist) flags |= KMOD_PROBE_APPLY_BLACKLIST; if (first_time) - flags |= KMOD_PROBE_STOP_ON_ALREADY_LOADED; + flags |= KMOD_PROBE_FAIL_ON_LOADED; kmod_list_foreach(l, list) { struct kmod_module *mod = kmod_module_get_module(l);