2008-08-11 11:31:57 +00:00
|
|
|
diff -rc module-init-tools-3.4-orig/depmod.c module-init-tools-3.4/depmod.c
|
|
|
|
*** module-init-tools-3.4-orig/depmod.c 2007-10-07 23:51:46.000000000 +0200
|
|
|
|
--- module-init-tools-3.4/depmod.c 2008-08-11 12:03:14.000000000 +0200
|
2006-07-27 15:06:58 +00:00
|
|
|
***************
|
2008-08-11 11:31:57 +00:00
|
|
|
*** 1066,1071 ****
|
|
|
|
--- 1066,1072 ----
|
2006-07-27 15:06:58 +00:00
|
|
|
*system_map = NULL;
|
|
|
|
struct module *list = NULL;
|
|
|
|
int i;
|
2008-08-11 11:31:57 +00:00
|
|
|
+ char *module_dir;
|
|
|
|
const char *config = NULL;
|
|
|
|
struct module_search *search = NULL;
|
|
|
|
struct module_overrides *overrides = NULL;
|
2006-07-27 15:06:58 +00:00
|
|
|
***************
|
2008-08-11 11:31:57 +00:00
|
|
|
*** 1148,1157 ****
|
2006-07-27 15:06:58 +00:00
|
|
|
if (optind == argc)
|
|
|
|
all = 1;
|
|
|
|
|
|
|
|
dirname = NOFAIL(malloc(strlen(basedir)
|
|
|
|
! + strlen(MODULE_DIR)
|
|
|
|
+ strlen(version) + 1));
|
|
|
|
! sprintf(dirname, "%s%s%s", basedir, MODULE_DIR, version);
|
|
|
|
|
|
|
|
if (maybe_all) {
|
|
|
|
if (!doing_stdout && !depfile_out_of_date(dirname))
|
2008-08-11 11:31:57 +00:00
|
|
|
--- 1149,1162 ----
|
2006-07-27 15:06:58 +00:00
|
|
|
if (optind == argc)
|
|
|
|
all = 1;
|
|
|
|
|
|
|
|
+ if((module_dir = getenv("MODULE_DIR")) == NULL) {
|
2006-07-27 16:23:29 +00:00
|
|
|
+ module_dir = "/lib/modules/";
|
2006-07-27 15:06:58 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
dirname = NOFAIL(malloc(strlen(basedir)
|
|
|
|
! + strlen(module_dir)
|
|
|
|
+ strlen(version) + 1));
|
|
|
|
! sprintf(dirname, "%s%s%s", basedir, module_dir, version);
|
|
|
|
|
|
|
|
if (maybe_all) {
|
|
|
|
if (!doing_stdout && !depfile_out_of_date(dirname))
|
2008-08-11 11:31:57 +00:00
|
|
|
Only in module-init-tools-3.4/: depmod.c~
|
|
|
|
Only in module-init-tools-3.4/: depmod.c.rej
|
|
|
|
diff -rc module-init-tools-3.4-orig/modinfo.c module-init-tools-3.4/modinfo.c
|
|
|
|
*** module-init-tools-3.4-orig/modinfo.c 2007-10-07 23:51:46.000000000 +0200
|
|
|
|
--- module-init-tools-3.4/modinfo.c 2008-08-11 12:07:55.000000000 +0200
|
2006-07-27 15:06:58 +00:00
|
|
|
***************
|
|
|
|
*** 18,27 ****
|
|
|
|
#define streq(a,b) (strcmp((a),(b)) == 0)
|
|
|
|
#define strstarts(a,start) (strncmp((a),(start), strlen(start)) == 0)
|
|
|
|
|
|
|
|
- #ifndef MODULE_DIR
|
|
|
|
- #define MODULE_DIR "/lib/modules"
|
|
|
|
- #endif
|
|
|
|
-
|
|
|
|
static int elf_endian;
|
|
|
|
static int my_endian;
|
|
|
|
|
|
|
|
--- 18,23 ----
|
|
|
|
***************
|
2008-08-11 11:31:57 +00:00
|
|
|
*** 278,283 ****
|
|
|
|
--- 274,280 ----
|
2006-07-27 15:06:58 +00:00
|
|
|
char *data;
|
|
|
|
struct utsname buf;
|
|
|
|
char *depname, *p;
|
|
|
|
+ char *module_dir;
|
|
|
|
|
|
|
|
data = grab_file(name, size);
|
|
|
|
if (data) {
|
|
|
|
***************
|
2008-08-11 11:31:57 +00:00
|
|
|
*** 290,301 ****
|
2006-07-27 15:06:58 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Search for it in modules.dep. */
|
2008-08-11 11:31:57 +00:00
|
|
|
if (kernel) {
|
|
|
|
! asprintf(&depname, "%s/%s/modules.dep", MODULE_DIR, kernel);
|
|
|
|
} else {
|
|
|
|
uname(&buf);
|
|
|
|
! asprintf(&depname, "%s/%s/modules.dep", MODULE_DIR,
|
|
|
|
buf.release);
|
|
|
|
}
|
2006-07-27 15:06:58 +00:00
|
|
|
data = grab_file(depname, size);
|
2008-08-11 11:31:57 +00:00
|
|
|
--- 287,302 ----
|
2006-07-27 15:06:58 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-08-11 11:31:57 +00:00
|
|
|
+ if((module_dir = getenv("MODULE_DIR")) == NULL) {
|
|
|
|
+ module_dir = "/lib/modules";
|
|
|
|
+ }
|
|
|
|
+
|
2006-07-27 15:06:58 +00:00
|
|
|
/* Search for it in modules.dep. */
|
2008-08-11 11:31:57 +00:00
|
|
|
if (kernel) {
|
|
|
|
! asprintf(&depname, "%s/%s/modules.dep", module_dir, kernel);
|
|
|
|
} else {
|
|
|
|
uname(&buf);
|
|
|
|
! asprintf(&depname, "%s/%s/modules.dep", module_dir,
|
|
|
|
buf.release);
|
|
|
|
}
|
2006-07-27 15:06:58 +00:00
|
|
|
data = grab_file(depname, size);
|
2008-08-11 11:31:57 +00:00
|
|
|
Only in module-init-tools-3.4/: modinfo.c~
|
|
|
|
Only in module-init-tools-3.4/: modinfo.c.rej
|
|
|
|
diff -rc module-init-tools-3.4-orig/modprobe.c module-init-tools-3.4/modprobe.c
|
|
|
|
*** module-init-tools-3.4-orig/modprobe.c 2007-10-07 23:57:23.000000000 +0200
|
|
|
|
--- module-init-tools-3.4/modprobe.c 2008-08-11 12:06:54.000000000 +0200
|
2006-07-27 15:06:58 +00:00
|
|
|
***************
|
|
|
|
*** 55,64 ****
|
|
|
|
char filename[0];
|
|
|
|
};
|
|
|
|
|
|
|
|
- #ifndef MODULE_DIR
|
|
|
|
- #define MODULE_DIR "/lib/modules"
|
|
|
|
- #endif
|
|
|
|
-
|
|
|
|
typedef void (*errfn_t)(const char *fmt, ...);
|
|
|
|
|
|
|
|
/* Do we use syslog or stderr for messages? */
|
|
|
|
--- 55,60 ----
|
|
|
|
***************
|
2008-08-11 11:31:57 +00:00
|
|
|
*** 1433,1438 ****
|
|
|
|
--- 1429,1435 ----
|
2006-07-27 15:06:58 +00:00
|
|
|
char *newname = NULL;
|
|
|
|
char *aliasfilename, *symfilename;
|
|
|
|
errfn_t error = fatal;
|
2008-08-11 11:31:57 +00:00
|
|
|
+ char *module_dir = NULL;
|
|
|
|
int flags = O_NONBLOCK|O_EXCL;
|
2006-07-27 15:06:58 +00:00
|
|
|
|
|
|
|
/* Prepend options from environment. */
|
|
|
|
***************
|
2008-08-11 11:31:57 +00:00
|
|
|
*** 1559,1566 ****
|
2006-07-27 15:06:58 +00:00
|
|
|
if (argc < optind + 1 && !dump_only && !list_only && !remove)
|
|
|
|
print_usage(argv[0]);
|
|
|
|
|
|
|
|
! dirname = NOFAIL(malloc(strlen(buf.release) + sizeof(MODULE_DIR) + 1));
|
|
|
|
! sprintf(dirname, "%s/%s", MODULE_DIR, buf.release);
|
|
|
|
aliasfilename = NOFAIL(malloc(strlen(dirname)
|
|
|
|
+ sizeof("/modules.alias")));
|
|
|
|
sprintf(aliasfilename, "%s/modules.alias", dirname);
|
2008-08-11 11:31:57 +00:00
|
|
|
--- 1556,1567 ----
|
2006-07-27 15:06:58 +00:00
|
|
|
if (argc < optind + 1 && !dump_only && !list_only && !remove)
|
|
|
|
print_usage(argv[0]);
|
|
|
|
|
|
|
|
! if((module_dir = getenv("MODULE_DIR")) == NULL) {
|
|
|
|
! module_dir = "/lib/modules";
|
|
|
|
! }
|
|
|
|
!
|
2006-07-27 16:57:58 +00:00
|
|
|
! dirname = NOFAIL(malloc(strlen(buf.release) + strlen(module_dir) + 2));
|
2006-07-27 15:06:58 +00:00
|
|
|
! sprintf(dirname, "%s/%s", module_dir, buf.release);
|
|
|
|
aliasfilename = NOFAIL(malloc(strlen(dirname)
|
|
|
|
+ sizeof("/modules.alias")));
|
|
|
|
sprintf(aliasfilename, "%s/modules.alias", dirname);
|
2008-08-11 11:31:57 +00:00
|
|
|
Only in module-init-tools-3.4/: modprobe.c~
|
|
|
|
Only in module-init-tools-3.4/: modprobe.c.rej
|