All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Adam J. Richter" <adam@yggdrasil.com>,
	greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Module alias and table support
Date: Thu, 28 Nov 2002 14:01:50 -0800	[thread overview]
Message-ID: <3DE6924E.9060609@pacbell.net> (raw)
In-Reply-To: 3DE5BB48.5090606@pacbell.net

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]


> Hmm, with 2.5.50 and module-init-tools 0.8a two "modules.*map" files
> are created -- but they're empty.  That's with the latest 2.5 modutils
> 
>   http://www.kernel.org/pub/linux/kernel/people/rusty/modules/
> 
> So that's not quite working yet. ...

OK -- good news!

I now have USB hotplugging behaving again, with three patches on
top of 2.5.50 and modutils 0.8a :

- The <linux/module.h> patch included with your 0.8a announce:
    http://marc.theaimsgroup.com/?l=linux-kernel&m=103845080926386&w=2

- A tweak to that patch to still include <linux/elf.h> (to compile)

- The attached patch to your "modprobe", implementing "-n" and (so
   I can see it works at least partially) using "-v".

Will you merge the modprobe patch?  TIA!

- Dave







[-- Attachment #2: modprobe.patch --]
[-- Type: text/plain, Size: 2583 bytes --]

--- modprobe.c-orig	Thu Nov 28 13:18:37 2002
+++ modprobe.c	Thu Nov 28 13:34:55 2002
@@ -53,6 +53,9 @@
 
 #define MODULE_DIR "/lib/modules"
 
+int show_only = 0;
+int verbose = 0;
+
 static void fatal(const char *fmt, ...)
 __attribute__ ((noreturn, format (printf, 1, 2)));
 
@@ -384,7 +387,7 @@
 	for (dep = mod->dependencies; dep != NULL; dep = dep->next)
 		insmod(dep->module, options, NULL, 0, &call_history);
 
-	/* If we fail to load after this piont, we abort the whole program. */
+	/* If we fail to load after this point, we abort the whole program. */
 	mod->state = LOADED;
 
 	/* Now, it may already be loaded: check /proc/modules */
@@ -428,13 +431,18 @@
 	if (newname)
 		rename_module(mod, map, st.st_size, newname);
 
-	ret = syscall(__NR_init_module, map, st.st_size, options);
-	if (ret != 0) {
-		if (dont_fail)
-			fatal("Error inserting %s (%s): %s\n",
-			      modname, mod->filename, moderror(errno));
-		warn("Error inserting %s (%s): %s\n",
-		     modname, mod->filename, moderror(errno));
+	if (verbose)
+		printf ("insmod %s\n", mod->filename);
+
+	if (!show_only) {
+		ret = syscall(__NR_init_module, map, st.st_size, options);
+		if (ret != 0) {
+			if (dont_fail)
+				fatal("Error inserting %s (%s): %s\n",
+				      modname, mod->filename, moderror(errno));
+			warn("Error inserting %s (%s): %s\n",
+			     modname, mod->filename, moderror(errno));
+		}
 	}
 	free(map);
  out_fd:
@@ -505,6 +513,7 @@
 				   { "showconfig", 0, NULL, 'c' },
 				   { "autoclean", 0, NULL, 'k' },
 				   { "quiet", 0, NULL, 'q' },
+				   { "show", 0, NULL, 'n' },
 				   { "syslog", 0, NULL, 's' },
 				   { NULL, 0, NULL, 0 } };
 
@@ -515,7 +524,6 @@
 	struct utsname buf;
 	int opt;
 	int dump_only = 0;
-	int verbose = 0;
 	const char *config = NULL;
 	char *dirname, *optstring = NOFAIL(strdup(""));
 	char *modname, *newname = NULL;
@@ -523,7 +531,7 @@
 
 	try_old_version("modprobe", argv);
 
-	while ((opt = getopt_long(argc, argv, "vVC:o:kqsc", options, NULL)) != -1){
+	while ((opt = getopt_long(argc, argv, "vVC:o:knqsc", options, NULL)) != -1){
 		switch (opt) {
 		case 'v':
 			verbose = 1;
@@ -543,6 +551,9 @@
 		case 'k':
 			/* FIXME: This should actually do something */
 			break;
+		case 'n':
+			show_only = 1;
+			break;
 		case 'q':
 			/* FIXME: This should actually do something */
 			break;
@@ -550,7 +561,7 @@
 			/* FIXME: This should actually do something */
 			break;
 		default:
-			fprintf(stderr, "Unknown option `%s'\n", argv[optind]);
+			fprintf(stderr, "Unknown option `%c'\n", opt);
 			print_usage(argv[0]);
 		}
 	}

  reply	other threads:[~2002-11-28 21:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-27 20:54 [PATCH] Module alias and table support Adam J. Richter
2002-11-27 21:53 ` David Brownell
     [not found]   ` <20021127142006.A24246@adam.yggdrasil.com>
2002-11-27 22:59     ` David Brownell
2002-11-28 23:39       ` Rusty Russell
2002-11-28  3:14   ` Rusty Russell
2002-11-28  6:44     ` David Brownell
2002-11-28 22:01       ` David Brownell [this message]
2002-11-29  3:26         ` Rusty Russell
2002-11-29 19:56           ` Gerd Knorr
2002-11-29  1:28       ` Rusty Russell
2002-11-29  3:40     ` Greg KH
2002-11-27 22:40 ` 2.5 modutils getting back device " David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2002-11-28  0:22 [PATCH] Module alias and " Adam J. Richter
2002-11-28  1:48 ` David Brownell
2002-11-28  4:45 ` Keith Owens
2002-11-27  6:25 David Brownell
2002-11-26  4:52 Adam J. Richter
2002-11-26  3:26 Adam J. Richter
2002-11-26  3:49 ` Greg KH
2002-11-14  1:19 Rusty Russell
2002-11-20  8:23 ` Greg KH
2002-11-24 23:34   ` Rusty Russell
2002-11-25 21:36     ` Greg KH
2002-11-25 23:42       ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DE6924E.9060609@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=adam@yggdrasil.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.