[BusyBox-cvs] CVS update of busybox/modutils (modprobe.c)

Robert Griebl sandman at codepoet.org
Thu Jul 22 00:03:40 UTC 2004


    Date: Wednesday, July 21, 2004 @ 18:03:40
  Author: sandman
    Path: /var/cvs/busybox/modutils

Modified: modprobe.c (1.32 -> 1.33)

Patch from Mike Snitzer <snitzer at gmail.com>:
Support for /etc/modprobe.conf (for 2.6 kernels) should likely be added 
to bb's modprobe, see attached patch.

modprobe.conf is just a (even simpler) variant of modules.conf


Index: busybox/modutils/modprobe.c
diff -u busybox/modutils/modprobe.c:1.32 busybox/modutils/modprobe.c:1.33
--- busybox/modutils/modprobe.c:1.32	Tue Jun 22 04:43:09 2004
+++ busybox/modutils/modprobe.c	Wed Jul 21 18:03:39 2004
@@ -275,9 +275,12 @@
 
 	// alias parsing is not 100% correct (no correct handling of continuation lines within an alias) !
 
-	if (( fd = open ( "/etc/modules.conf", O_RDONLY )) < 0 )
-		if (( fd = open ( "/etc/conf.modules", O_RDONLY )) < 0 )
-			return first;
+#if defined(CONFIG_FEATURE_2_6_MODULES)
+	if (( fd = open ( "/etc/modprobe.conf", O_RDONLY )) < 0 )
+#endif
+		if (( fd = open ( "/etc/modules.conf", O_RDONLY )) < 0 )
+			if (( fd = open ( "/etc/conf.modules", O_RDONLY )) < 0 )
+				return first;
 
 	continuation_line = 0;
 	while ( reads ( fd, buffer, sizeof( buffer ))) {



More information about the busybox-cvs mailing list