summaryrefslogtreecommitdiffstats
path: root/source/a/module-init-tools/modprobe.ignore_some_suffixes.diff
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2010-05-19 08:58:23 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:43:05 +0200
commitb76270bf9e6dd375e495fec92140a79a79415d27 (patch)
tree3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/a/module-init-tools/modprobe.ignore_some_suffixes.diff
parent5a12e7c134274dba706667107d10d231517d3e05 (diff)
downloadcurrent-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz
current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.xz
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy!
Diffstat (limited to 'source/a/module-init-tools/modprobe.ignore_some_suffixes.diff')
-rw-r--r--source/a/module-init-tools/modprobe.ignore_some_suffixes.diff54
1 files changed, 26 insertions, 28 deletions
diff --git a/source/a/module-init-tools/modprobe.ignore_some_suffixes.diff b/source/a/module-init-tools/modprobe.ignore_some_suffixes.diff
index 24967f0b2..a65fba0ad 100644
--- a/source/a/module-init-tools/modprobe.ignore_some_suffixes.diff
+++ b/source/a/module-init-tools/modprobe.ignore_some_suffixes.diff
@@ -1,43 +1,41 @@
-diff -Nur module-init-tools-3.6.old/modprobe.c module-init-tools-3.6.new/modprobe.c
---- module-init-tools-3.6.old/modprobe.c 2009-02-04 01:45:24.000000000 -0600
-+++ module-init-tools-3.6.new/modprobe.c 2009-02-08 01:40:24.143637295 -0600
+diff -Nur module-init-tools-3.11.orig/modprobe.c module-init-tools-3.11.new/modprobe.c
+--- module-init-tools-3.11.orig/modprobe.c 2009-10-15 04:59:28.000000000 -0500
++++ module-init-tools-3.11.new/modprobe.c 2009-10-15 08:14:12.108359199 -0500
@@ -38,6 +38,7 @@
#include <asm/unistd.h>
#include <sys/wait.h>
#include <syslog.h>
+#include <regex.h>
- #define streq(a,b) (strcmp((a),(b)) == 0)
- #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-@@ -1275,6 +1276,20 @@
- return 1;
+ #include "util.h"
+ #include "elfops.h"
+@@ -861,6 +862,20 @@
+ options, commands, aliases, blacklist);
}
+/* Let's exclude a few file extensions */
+static int valid_file_name(const char *filename)
+{
-+ static regex_t *re = NULL;
++ static regex_t *re = NULL;
+
-+ if (!re) {
-+ re = NOFAIL(malloc(sizeof(regex_t)));
-+ if (regcomp(re, "(^(\\.|\\.\\.)|\\.(new|orig|bak)$)",
-+ REG_EXTENDED|REG_NOSUB) != 0)
-+ fatal("regcomp failed: %s\n", strerror(errno));
-+ }
-+ return regexec(re, filename, 0, NULL, 0);
++ if (!re) {
++ re = NOFAIL(malloc(sizeof(regex_t)));
++ if (regcomp(re, "(^(\\.|\\.\\.)|\\.(new|orig|bak)$)",
++ REG_EXTENDED|REG_NOSUB) != 0)
++ fatal("regcomp failed: %s\n", strerror(errno));
++ }
++ return regexec(re, filename, 0, NULL, 0);
+}
+
- /* Simple format, ignore lines starting with #, one command per line.
- Returns true or false. */
- static int read_config(const char *filename,
-@@ -1294,7 +1309,10 @@
- if (dir) {
- struct dirent *i;
+ static int parse_config_scan(const char *filename,
+ const char *name,
+ int dump_only,
+@@ -887,6 +902,8 @@
while ((i = readdir(dir)) != NULL) {
-+ /* Removed this line:
- if (!streq(i->d_name,".") && !streq(i->d_name,"..")
-+ and replaced with this one: */
-+ if (valid_file_name(i->d_name)
- && config_filter(i->d_name)) {
- char sub[strlen(filename) + 1
- + strlen(i->d_name) + 1];
+ size_t len;
+
++ if (!valid_file_name(i->d_name))
++ continue;
+ if (i->d_name[0] == '.')
+ continue;
+ if (!config_filter(i->d_name))