diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2013-09-20 01:40:58 -0500 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2013-09-20 01:42:04 -0500 |
commit | 017893f244dd9e6d16311743121ca82e39ab5a01 (patch) | |
tree | 5ac4c59b53551b596647cb6a1ab0078f5b5c23c1 | |
parent | 7ab8804448377fb6b8854f2dd288608db01bb43b (diff) | |
download | kmod-017893f244dd9e6d16311743121ca82e39ab5a01.tar.gz |
rmmod: remove --wait option
Let libkmod enforce KMOD_REMOVE_NOWAIT.
-rw-r--r-- | tools/rmmod.c | 16 |
1 files changed, 5 insertions, 11 deletions
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 @@ static int do_rmmod(int argc, char *argv[]) { 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 @@ static int do_rmmod(int argc, char *argv[]) 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 @@ static int do_rmmod(int argc, char *argv[]) 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) { |