mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
b65d095ad7
svn path=/nixpkgs/trunk/; revision=12581
153 lines
4.4 KiB
Diff
153 lines
4.4 KiB
Diff
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
|
|
***************
|
|
*** 1066,1071 ****
|
|
--- 1066,1072 ----
|
|
*system_map = NULL;
|
|
struct module *list = NULL;
|
|
int i;
|
|
+ char *module_dir;
|
|
const char *config = NULL;
|
|
struct module_search *search = NULL;
|
|
struct module_overrides *overrides = NULL;
|
|
***************
|
|
*** 1148,1157 ****
|
|
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))
|
|
--- 1149,1162 ----
|
|
if (optind == argc)
|
|
all = 1;
|
|
|
|
+ if((module_dir = getenv("MODULE_DIR")) == NULL) {
|
|
+ module_dir = "/lib/modules/";
|
|
+ }
|
|
+
|
|
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))
|
|
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
|
|
***************
|
|
*** 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 ----
|
|
***************
|
|
*** 278,283 ****
|
|
--- 274,280 ----
|
|
char *data;
|
|
struct utsname buf;
|
|
char *depname, *p;
|
|
+ char *module_dir;
|
|
|
|
data = grab_file(name, size);
|
|
if (data) {
|
|
***************
|
|
*** 290,301 ****
|
|
return NULL;
|
|
}
|
|
|
|
/* Search for it in modules.dep. */
|
|
if (kernel) {
|
|
! asprintf(&depname, "%s/%s/modules.dep", MODULE_DIR, kernel);
|
|
} else {
|
|
uname(&buf);
|
|
! asprintf(&depname, "%s/%s/modules.dep", MODULE_DIR,
|
|
buf.release);
|
|
}
|
|
data = grab_file(depname, size);
|
|
--- 287,302 ----
|
|
return NULL;
|
|
}
|
|
|
|
+ if((module_dir = getenv("MODULE_DIR")) == NULL) {
|
|
+ module_dir = "/lib/modules";
|
|
+ }
|
|
+
|
|
/* Search for it in modules.dep. */
|
|
if (kernel) {
|
|
! asprintf(&depname, "%s/%s/modules.dep", module_dir, kernel);
|
|
} else {
|
|
uname(&buf);
|
|
! asprintf(&depname, "%s/%s/modules.dep", module_dir,
|
|
buf.release);
|
|
}
|
|
data = grab_file(depname, size);
|
|
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
|
|
***************
|
|
*** 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 ----
|
|
***************
|
|
*** 1433,1438 ****
|
|
--- 1429,1435 ----
|
|
char *newname = NULL;
|
|
char *aliasfilename, *symfilename;
|
|
errfn_t error = fatal;
|
|
+ char *module_dir = NULL;
|
|
int flags = O_NONBLOCK|O_EXCL;
|
|
|
|
/* Prepend options from environment. */
|
|
***************
|
|
*** 1559,1566 ****
|
|
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);
|
|
--- 1556,1567 ----
|
|
if (argc < optind + 1 && !dump_only && !list_only && !remove)
|
|
print_usage(argv[0]);
|
|
|
|
! if((module_dir = getenv("MODULE_DIR")) == NULL) {
|
|
! module_dir = "/lib/modules";
|
|
! }
|
|
!
|
|
! dirname = NOFAIL(malloc(strlen(buf.release) + strlen(module_dir) + 2));
|
|
! sprintf(dirname, "%s/%s", module_dir, buf.release);
|
|
aliasfilename = NOFAIL(malloc(strlen(dirname)
|
|
+ sizeof("/modules.alias")));
|
|
sprintf(aliasfilename, "%s/modules.alias", dirname);
|
|
Only in module-init-tools-3.4/: modprobe.c~
|
|
Only in module-init-tools-3.4/: modprobe.c.rej
|