packages: module-init-tools/module-init-tools-modprobe_d.patch - ignore dir...

arekm arekm at pld-linux.org
Tue Aug 11 09:56:06 CEST 2009


Author: arekm                        Date: Tue Aug 11 07:56:06 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- ignore dirs in /etc/modprobe.d/

---- Files affected:
packages/module-init-tools:
   module-init-tools-modprobe_d.patch (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: packages/module-init-tools/module-init-tools-modprobe_d.patch
diff -u packages/module-init-tools/module-init-tools-modprobe_d.patch:1.6 packages/module-init-tools/module-init-tools-modprobe_d.patch:1.7
--- packages/module-init-tools/module-init-tools-modprobe_d.patch:1.6	Tue Aug 11 09:03:47 2009
+++ packages/module-init-tools/module-init-tools-modprobe_d.patch	Tue Aug 11 09:56:00 2009
@@ -1,7 +1,15 @@
 diff -Nur module-init-tools-3.2.2/modprobe.c module-init-tools-3.2.2.modprobe_d/modprobe.c
 --- module-init-tools-3.2.2/modprobe.c	2005-12-02 00:42:09.000000000 +0100
 +++ module-init-tools-3.2.2.modprobe_d/modprobe.c	2006-01-21 03:11:18.000000000 +0100
-@@ -73,6 +73,8 @@
+@@ -17,6 +17,7 @@
+     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+ #define _GNU_SOURCE /* asprintf */
++#define	_BSD_SOURCE /* DT_DIR */
+ 
+ #include <sys/utsname.h>
+ #include <sys/types.h>
+@@ -73,6 +74,8 @@
  
  } modprobe_flags_t;
  
@@ -10,7 +18,22 @@
  #ifndef MODULE_DIR
  #define MODULE_DIR "/lib/modules"
  #endif
-@@ -876,10 +878,12 @@
+@@ -867,19 +870,27 @@
+ 		/* sort files from directory into list */
+ 		while ((i = readdir(dir)) != NULL) {
+ 			size_t len;
++			struct stat statbuf;
++			char statpath[PATH_MAX];
+ 
+ 			if (i->d_name[0] == '.')
+ 				continue;
+ 			if (!config_filter(i->d_name))
+ 				continue;
+ 
++			snprintf(statpath, sizeof(statpath), "%s/%s", filename, i->d_name);
++			if ((stat(statpath, &statbuf) == 0) && (S_ISDIR(statbuf.st_mode)))
++				continue;
++
  			len = strlen(i->d_name);
  			if (len < 6 ||
  			    (strcmp(&i->d_name[len-5], ".conf") != 0 &&
@@ -25,7 +48,7 @@
  			fe = malloc(sizeof(struct file_entry) + len + 1);
  			if (fe == NULL)
  				continue;
-@@ -940,6 +944,11 @@
+@@ -940,6 +951,11 @@
  		warn("Deprecated config file /etc/modprobe.conf, "
  		      "all config files belong into /etc/modprobe.d/.\n");
  
@@ -37,7 +60,7 @@
  	/* default config */
  	parse_config_scan("/etc/modprobe.d", name, dump_only, removing,
  			  options, commands, aliases, blacklist);
-@@ -1509,6 +1518,7 @@
+@@ -1509,6 +1525,7 @@
  		print_usage(argv[0]);
  
  	nofail_asprintf(&dirname, "%s%s/%s", basedir, MODULE_DIR, buf.release);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/module-init-tools/module-init-tools-modprobe_d.patch?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list