aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Robinson <andr345@gmail.com>2009-06-13 15:12:13 +0200
committerAndreas Robinson <andr345@gmail.com>2009-06-13 15:12:13 +0200
commitb45a24e9c89a14baf63bffe0a9ff04c1c1bffb29 (patch)
treef303cc2c1af903bf3280ea549c17d86a7a756aeb
parent43f91f7d816b5bff4f9753017e7fa934c6acb6d3 (diff)
downloadmodule-init-tools-b45a24e9c89a14baf63bffe0a9ff04c1c1bffb29.tar.gz
modprobe: remove broken -w option
This reverts commit 5a402b77821e76f318beffff3f544ad3c7250c21 dated 5 Sep 2007. The call to delete_module() is unaffected by the -w option and delete_module() (in 2.6.29) itself can not be made to block the way that is intended. Signed-off-by: Andreas Robinson <andr345@gmail.com>
-rw-r--r--modprobe.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/modprobe.c b/modprobe.c
index fcdfd05..b20aa9b 100644
--- a/modprobe.c
+++ b/modprobe.c
@@ -1183,8 +1183,7 @@ static void rmmod(struct list_head *list,
struct module_command *commands,
int ignore_commands,
int ignore_inuse,
- const char *cmdline_opts,
- int flags)
+ const char *cmdline_opts)
{
const char *command;
unsigned int usecount = 0;
@@ -1230,7 +1229,7 @@ static void rmmod(struct list_head *list,
/* Now do things we depend. */
if (!list_empty(list))
rmmod(list, NULL, 0, warn, dry_run, commands,
- 0, 1, "", flags);
+ 0, 1, "");
return;
nonexistent_module:
@@ -1253,8 +1252,7 @@ static int handle_module(const char *modname,
int ignore_inuse,
int strip_vermagic,
int strip_modversion,
- const char *cmdline_opts,
- int flags)
+ const char *cmdline_opts)
{
if (list_empty(todo_list)) {
const char *command;
@@ -1275,7 +1273,7 @@ static int handle_module(const char *modname,
if (remove)
rmmod(todo_list, newname, first_time, error, dry_run,
- commands, ignore_commands, 0, cmdline_opts, flags);
+ commands, ignore_commands, 0, cmdline_opts);
else
insmod(todo_list, NOFAIL(strdup(options)), newname,
first_time, error, dry_run, modoptions,
@@ -1297,7 +1295,6 @@ static struct option options[] = { { "version", 0, NULL, 'V' },
{ "config", 1, NULL, 'C' },
{ "name", 1, NULL, 'o' },
{ "remove", 0, NULL, 'r' },
- { "wait", 0, NULL, 'w' },
{ "showconfig", 0, NULL, 'c' },
{ "list", 0, NULL, 'l' },
{ "type", 1, NULL, 't' },
@@ -1337,14 +1334,13 @@ int main(int argc, char *argv[])
char *newname = NULL;
char *dirname, *aliasfilename, *symfilename;
errfn_t error = fatal;
- int flags = O_NONBLOCK|O_EXCL;
int failed = 0;
/* Prepend options from environment. */
argv = merge_args(getenv("MODPROBE_OPTIONS"), argv, &argc);
uname(&buf);
- while ((opt = getopt_long(argc, argv, "Vvqsnd:C:o:rwclt:aibf", options, NULL)) != -1){
+ while ((opt = getopt_long(argc, argv, "Vvqsnd:C:o:rclt:aibf", options, NULL)) != -1){
switch (opt) {
case 'V':
puts(PACKAGE " version " VERSION);
@@ -1387,9 +1383,6 @@ int main(int argc, char *argv[])
case 'r':
remove = 1;
break;
- case 'w':
- flags &= ~O_NONBLOCK;
- break;
case 'c':
dump_config = 1;
break;
@@ -1544,7 +1537,7 @@ int main(int argc, char *argv[])
commands, ignore_commands,
ignore_inuse, strip_vermagic,
strip_modversion,
- cmdline_opts, flags))
+ cmdline_opts))
failed = 1;
aliases = aliases->next;
@@ -1560,7 +1553,7 @@ int main(int argc, char *argv[])
modoptions, commands,
ignore_commands, ignore_inuse,
strip_vermagic, strip_modversion,
- cmdline_opts, flags))
+ cmdline_opts))
failed = 1;
}
}