free(options);
break;
}
+
if (print_action != NULL)
print_action(m, true, options ?: "");
- err = module_do_install_commands(m, options, &cb);
+ if (!(flags & KMOD_PROBE_DRY_RUN))
+ err = module_do_install_commands(m, options,
+ &cb);
} else {
int state;
if (print_action != NULL)
print_action(m, false, options ?: "");
- err = kmod_module_insert_module(m, flags, options);
+ if (!(flags & KMOD_PROBE_DRY_RUN))
+ err = kmod_module_insert_module(m, flags,
+ options);
}
free(options);
KMOD_PROBE_FORCE_MODVERSION = 0x00002,
KMOD_PROBE_IGNORE_COMMAND = 0x00004,
KMOD_PROBE_IGNORE_LOADED = 0x00008,
+ KMOD_PROBE_DRY_RUN = 0x00010,
/* codes below can be used in return value, too */
KMOD_PROBE_APPLY_BLACKLIST_ALL = 0x10000,