rmmod: remove --wait option Let libkmod enforce KMOD_REMOVE_NOWAIT.
diff --git a/tools/rmmod.c b/tools/rmmod.c index bf5a408..fd0fac5 100644 --- a/tools/rmmod.c +++ b/tools/rmmod.c
@@ -104,7 +104,7 @@ { struct kmod_ctx *ctx; const char *null_config = NULL; - int flags = KMOD_REMOVE_NOWAIT; + int flags = 0; int i, err, r = 0; for (;;) { @@ -122,11 +122,6 @@ case 'v': verbose++; break; - case 'w': - ERR("'Wait' behavior is targeted for removal from kernel.\nWe will now sleep for 10s, and then continue.\n"); - sleep(10); - flags &= ~KMOD_REMOVE_NOWAIT; - break; case 'h': help(); return EXIT_SUCCESS; @@ -173,11 +168,10 @@ break; } - if (!(flags & KMOD_REMOVE_FORCE) && (flags & KMOD_REMOVE_NOWAIT)) - if (check_module_inuse(mod) < 0) { - r++; - goto next; - } + if (!(flags & KMOD_REMOVE_FORCE) && check_module_inuse(mod) < 0) { + r++; + goto next; + } err = kmod_module_remove_module(mod, flags); if (err < 0) {