diff options
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/adsl.c | 4 | ||||
-rw-r--r-- | mdk-stage1/cdrom.c | 10 | ||||
-rw-r--r-- | mdk-stage1/disk.c | 2 | ||||
-rw-r--r-- | mdk-stage1/lomount.c | 4 | ||||
-rw-r--r-- | mdk-stage1/modules.c | 8 | ||||
-rw-r--r-- | mdk-stage1/modules.h | 2 | ||||
-rw-r--r-- | mdk-stage1/mount.c | 28 | ||||
-rw-r--r-- | mdk-stage1/network.c | 2 | ||||
-rw-r--r-- | mdk-stage1/probe-modules.c | 2 | ||||
-rw-r--r-- | mdk-stage1/probing.c | 20 | ||||
-rw-r--r-- | mdk-stage1/stage1.c | 12 | ||||
-rw-r--r-- | mdk-stage1/thirdparty.c | 2 | ||||
-rw-r--r-- | mdk-stage1/tools.c | 12 |
13 files changed, 54 insertions, 54 deletions
diff --git a/mdk-stage1/adsl.c b/mdk-stage1/adsl.c index ace741c18..59301e82d 100644 --- a/mdk-stage1/adsl.c +++ b/mdk-stage1/adsl.c @@ -156,8 +156,8 @@ enum return_type perform_adsl(struct interface_info * intf) intf->boot_proto = BOOTPROTO_ADSL_PPPOE; wait_message("Waiting for ADSL connection to show up..."); - my_insmod("ppp_generic", ANY_DRIVER_TYPE, NULL, 1); - my_insmod("ppp_async", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("ppp_generic", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("ppp_async", ANY_DRIVER_TYPE, NULL, 1); results = adsl_connect(intf, answers[0], answers[1], answers[2]); remove_wait_message(); diff --git a/mdk-stage1/cdrom.c b/mdk-stage1/cdrom.c index e75e0fde4..dac422173 100644 --- a/mdk-stage1/cdrom.c +++ b/mdk-stage1/cdrom.c @@ -138,7 +138,7 @@ enum return_type cdrom_prepare(void) enum return_type results; static int already_probed_ide_generic = 0; - my_insmod("ide_cd_mod", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("ide_cd_mod", ANY_DRIVER_TYPE, NULL, 0); if (IS_AUTOMATIC) { get_medias(CDROM, &medias, &medias_models, BUS_IDE); @@ -149,7 +149,7 @@ enum return_type cdrom_prepare(void) if ((i = try_automatic(medias, medias_models)) != -1) return do_with_device(medias[i], medias_models[i]); - my_insmod("sr_mod", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("sr_mod", ANY_DRIVER_TYPE, NULL, 0); get_medias(CDROM, &medias, &medias_models, BUS_SCSI); if ((i = try_automatic(medias, medias_models)) != -1) return do_with_device(medias[i], medias_models[i]); @@ -159,7 +159,7 @@ enum return_type cdrom_prepare(void) return do_with_device(medias[i], medias_models[i]); /* detect hybrid isos (isos dumped to an USB stick) */ - my_insmod("sd_mod", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("sd_mod", ANY_DRIVER_TYPE, NULL, 0); get_medias(DISK, &medias, &medias_models, BUS_USB); if ((i = try_automatic(medias, medias_models)) != -1) { return do_with_device(medias[i], medias_models[i]); @@ -167,7 +167,7 @@ enum return_type cdrom_prepare(void) unset_automatic(); } else - my_insmod("sr_mod", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("sr_mod", ANY_DRIVER_TYPE, NULL, 0); get_medias(CDROM, &medias, &medias_models, BUS_ANY); @@ -180,7 +180,7 @@ enum return_type cdrom_prepare(void) if (count == 0) { if (!already_probed_ide_generic) { already_probed_ide_generic = 1; - my_insmod("ide_generic", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("ide_generic", ANY_DRIVER_TYPE, NULL, 0); return cdrom_prepare(); } stg1_error_message("No CDROM device found."); diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c index 804c8ea2b..b72a5c212 100644 --- a/mdk-stage1/disk.c +++ b/mdk-stage1/disk.c @@ -191,7 +191,7 @@ enum return_type disk_prepare(void) if (count == 0) { if (!already_probed_ide_generic) { already_probed_ide_generic = 1; - my_insmod("ide_generic", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("ide_generic", ANY_DRIVER_TYPE, NULL, 0); return disk_prepare(); } stg1_error_message("No DISK drive found."); diff --git a/mdk-stage1/lomount.c b/mdk-stage1/lomount.c index b7d61f24b..08f80e464 100644 --- a/mdk-stage1/lomount.c +++ b/mdk-stage1/lomount.c @@ -165,9 +165,9 @@ lomount(char *loopfile, char *where, char **dev, int compressed) flag = MS_MGC_VAL; flag |= MS_RDONLY; - my_insmod("loop", ANY_DRIVER_TYPE, "max_loop=256", 1); + my_modprobe("loop", ANY_DRIVER_TYPE, "max_loop=256", 1); if (compressed) { - my_insmod("squashfs", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("squashfs", ANY_DRIVER_TYPE, NULL, 1); } if (!(loopdev = find_free_loop())) { diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c index 0c9aa0c32..f1fd12130 100644 --- a/mdk-stage1/modules.c +++ b/mdk-stage1/modules.c @@ -338,9 +338,9 @@ static enum insmod_return insmod_with_deps(const char * mod_name, char * options #ifndef DISABLE_NETWORK -enum insmod_return my_insmod(const char * mod_name, enum driver_type type, char * options, int allow_modules_floppy) +enum insmod_return my_modprobe(const char * mod_name, enum driver_type type, char * options, int allow_modules_floppy) #else -enum insmod_return my_insmod(const char * mod_name, enum driver_type type __attribute__ ((unused)), char * options, int allow_modules_floppy) +enum insmod_return my_modprobe(const char * mod_name, enum driver_type type __attribute__ ((unused)), char * options, int allow_modules_floppy) #endif { int i; @@ -411,9 +411,9 @@ static enum return_type insmod_with_options(char * mod, enum driver_type type) strcat(options, mod); strcat(options, " "); - strcat(options, answers[0]); // because my_insmod will eventually modify the string + strcat(options, answers[0]); // because my_modprobe will eventually modify the string - if (my_insmod(mod, type, answers[0], 1) != INSMOD_OK) { + if (my_modprobe(mod, type, answers[0], 1) != INSMOD_OK) { stg1_error_message("Insmod failed."); return RETURN_ERROR; } diff --git a/mdk-stage1/modules.h b/mdk-stage1/modules.h index 96ba48fc2..f04879fb0 100644 --- a/mdk-stage1/modules.h +++ b/mdk-stage1/modules.h @@ -23,7 +23,7 @@ enum insmod_return { INSMOD_OK, INSMOD_FAILED, INSMOD_FAILED_FILE_NOT_FOUND }; void init_modules_insmoding(void); void init_firmware_loader(void); int insmod_local_file(char * path, char * options); -enum insmod_return my_insmod(const char * mod_name, enum driver_type type, char * options, int allow_modules_floppy); +enum insmod_return my_modprobe(const char * mod_name, enum driver_type type, char * options, int allow_modules_floppy); enum return_type ask_insmod(enum driver_type); int module_already_present(const char * name); diff --git a/mdk-stage1/mount.c b/mdk-stage1/mount.c index 918f5d1a2..008fb5f6b 100644 --- a/mdk-stage1/mount.c +++ b/mdk-stage1/mount.c @@ -212,8 +212,8 @@ int my_mount(char *dev, char *location, char *fs, int force_rw) } if (!strcmp(fs, "supermount")) { - my_insmod("supermount", ANY_DRIVER_TYPE, NULL, 1); - my_insmod("isofs", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("supermount", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("isofs", ANY_DRIVER_TYPE, NULL, 1); opts = alloca(500); sprintf(opts, "dev=%s,fs=iso9660,tray_lock=always", dev); dev = "none"; @@ -221,41 +221,41 @@ int my_mount(char *dev, char *location, char *fs, int force_rw) #ifndef DISABLE_MEDIAS if (!strcmp(fs, "vfat")) { - my_insmod("nls_cp437", ANY_DRIVER_TYPE, NULL, 1); - my_insmod("nls_iso8859_1", ANY_DRIVER_TYPE, NULL, 1); - my_insmod("vfat", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("nls_cp437", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("nls_iso8859_1", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("vfat", ANY_DRIVER_TYPE, NULL, 1); opts = "check=relaxed"; } if (!strcmp(fs, "ntfs")) { - my_insmod("ntfs", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("ntfs", ANY_DRIVER_TYPE, NULL, 1); } if (!strcmp(fs, "reiserfs")) - my_insmod("reiserfs", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("reiserfs", ANY_DRIVER_TYPE, NULL, 1); if (!strcmp(fs, "reiser4")) - my_insmod("reiser4", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("reiser4", ANY_DRIVER_TYPE, NULL, 1); if (!strcmp(fs, "jfs")) - my_insmod("jfs", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("jfs", ANY_DRIVER_TYPE, NULL, 1); if (!strcmp(fs, "xfs")) - my_insmod("xfs", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("xfs", ANY_DRIVER_TYPE, NULL, 1); if (!strcmp(fs, "ext4")) - my_insmod("ext4", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("ext4", ANY_DRIVER_TYPE, NULL, 1); if (!strcmp(fs, "btrfs")) - my_insmod("btrfs", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("btrfs", ANY_DRIVER_TYPE, NULL, 1); #endif if (!strcmp(fs, "iso9660")) - my_insmod("isofs", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("isofs", ANY_DRIVER_TYPE, NULL, 1); #ifndef DISABLE_NETWORK if (!strcmp(fs, "nfs")) { - my_insmod("nfs", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("nfs", ANY_DRIVER_TYPE, NULL, 1); log_message("preparing nfsmount for %s", dev); rc = nfsmount_prepare(dev, &opts); if (rc != 0) diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c index 29455e5bc..c3ac0f36a 100644 --- a/mdk-stage1/network.c +++ b/mdk-stage1/network.c @@ -575,7 +575,7 @@ static enum return_type bringup_networking(struct interface_info * intf) /* badly */ fd = open("/proc/net/packet", O_RDONLY); if (fd < 0) - my_insmod("af_packet", ANY_DRIVER_TYPE, NULL, 1); + my_modprobe("af_packet", ANY_DRIVER_TYPE, NULL, 1); else close(fd); diff --git a/mdk-stage1/probe-modules.c b/mdk-stage1/probe-modules.c index f101430b8..550690558 100644 --- a/mdk-stage1/probe-modules.c +++ b/mdk-stage1/probe-modules.c @@ -58,7 +58,7 @@ int main(int argc, char **argv, char **env) init_modules_insmoding(); if (module) { - my_insmod(module, ANY_DRIVER_TYPE, options, 0); + my_modprobe(module, ANY_DRIVER_TYPE, options, 0); } else { find_media(bus); } diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c index 5f9983efb..224bf42ea 100644 --- a/mdk-stage1/probing.c +++ b/mdk-stage1/probing.c @@ -272,10 +272,10 @@ void discovered_device(enum driver_type type, const char * description, const ch if (type == MEDIA_ADAPTERS) { const char * alternate = NULL; wait_message("Loading driver for media adapter:\n \n%s", description); - failed = my_insmod(driver, MEDIA_ADAPTERS, NULL, 1); + failed = my_modprobe(driver, MEDIA_ADAPTERS, NULL, 1); alternate = get_alternate_module(driver); if (!IS_NOAUTO && alternate) { - failed = failed || my_insmod(alternate, MEDIA_ADAPTERS, NULL, 1); + failed = failed || my_modprobe(alternate, MEDIA_ADAPTERS, NULL, 1); } remove_wait_message(); warning_insmod_failed(failed); @@ -285,7 +285,7 @@ void discovered_device(enum driver_type type, const char * description, const ch if (type == NETWORK_DEVICES) { wait_message("Loading driver for network device:\n \n%s", description); prepare_intf_descr(description); - failed = my_insmod(driver, NETWORK_DEVICES, NULL, 1); + failed = my_modprobe(driver, NETWORK_DEVICES, NULL, 1); warning_insmod_failed(failed); remove_wait_message(); if (intf_descr_for_discover) /* for modules providing more than one net intf */ @@ -295,7 +295,7 @@ void discovered_device(enum driver_type type, const char * description, const ch #ifdef ENABLE_USB if (type == USB_CONTROLLERS) /* we can't allow additional modules floppy since we need usbhid for keystrokes of usb keyboards */ - failed = my_insmod(driver, USB_CONTROLLERS, NULL, 0); + failed = my_modprobe(driver, USB_CONTROLLERS, NULL, 0); #endif } @@ -337,7 +337,7 @@ void probe_virtio_modules(void) if (e->vendor == VIRTIO_PCI_VENDOR) { if (!loaded_pci) { log_message("loading virtio-pci"); - my_insmod("virtio_pci", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("virtio_pci", ANY_DRIVER_TYPE, NULL, 0); loaded_pci = 1; } @@ -360,7 +360,7 @@ void probe_virtio_modules(void) } if (name) { log_message("virtio: loading %s", name); - my_insmod(name, ANY_DRIVER_TYPE, options, 0); + my_modprobe(name, ANY_DRIVER_TYPE, options, 0); } } } @@ -431,7 +431,7 @@ void probe_that_type(enum driver_type type, enum media_bus bus __attribute__ ((u already_mounted_usbdev = 1; wait_message("Detecting USB devices."); sleep(4); /* sucking background work */ - my_insmod("usbhid", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("usbhid", ANY_DRIVER_TYPE, NULL, 0); remove_wait_message(); } @@ -546,9 +546,9 @@ void probe_that_type(enum driver_type type, enum media_bus bus __attribute__ ((u already_probed_usb_controllers && !already_loaded_usb_scsi) { already_loaded_usb_scsi = 1; /* we can't allow additional modules floppy since we need usbkbd for keystrokes of usb keyboards */ - my_insmod("usb_storage", MEDIA_ADAPTERS, NULL, 0); + my_modprobe("usb_storage", MEDIA_ADAPTERS, NULL, 0); if (module_already_present("ieee1394")) - my_insmod("sbp2", MEDIA_ADAPTERS, NULL, 0); + my_modprobe("sbp2", MEDIA_ADAPTERS, NULL, 0); wait_message("Detecting USB mass-storage devices."); #ifndef DEBUG sleep(10); /* sucking background work */ @@ -960,7 +960,7 @@ char ** get_net_devices(void) int i = 0; if (!already_probed) { - already_probed = 1; /* cut off loop brought by: probe_that_type => my_insmod => get_net_devices */ + already_probed = 1; /* cut off loop brought by: probe_that_type => my_modprobe => get_net_devices */ probe_that_type(NETWORK_DEVICES, BUS_ANY); } diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c index 8d1d092aa..8a0de4921 100644 --- a/mdk-stage1/stage1.c +++ b/mdk-stage1/stage1.c @@ -225,12 +225,12 @@ static void handle_pcmcia(void) log_message("no pcmcia adapter found"); return; } - my_insmod("pcmcia_core", ANY_DRIVER_TYPE, NULL, 0); - my_insmod(pcmcia_adapter, ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("pcmcia_core", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe(pcmcia_adapter, ANY_DRIVER_TYPE, NULL, 0); /* ds is an alias for pcmcia in recent 2.6 kernels but we don't have modules.alias in install, so try to load both */ - my_insmod("ds", ANY_DRIVER_TYPE, NULL, 0); - my_insmod("pcmcia", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("ds", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("pcmcia", ANY_DRIVER_TYPE, NULL, 0); /* setup a dynamic resource database for non statically mapped PCMCIA sockets */ pcmcia_socket_startup(-1); @@ -248,9 +248,9 @@ static void handle_hid(void) entry_list = hid_probe(); for (i = 0; i < entry_list.nb; i++) { if (entry_list.entries[i].module != NULL) - my_insmod(entry_list.entries[i].module, ANY_DRIVER_TYPE, NULL, 0); + my_modprobe(entry_list.entries[i].module, ANY_DRIVER_TYPE, NULL, 0); } - my_insmod("hid_generic", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("hid_generic", ANY_DRIVER_TYPE, NULL, 0); } diff --git a/mdk-stage1/thirdparty.c b/mdk-stage1/thirdparty.c index 57f38a2a4..e2e416e0a 100644 --- a/mdk-stage1/thirdparty.c +++ b/mdk-stage1/thirdparty.c @@ -333,7 +333,7 @@ static enum return_type thirdparty_autoload_modules(const char *modules_location entry++; } if (!entry || !*entry) { - enum insmod_return ret = my_insmod(module, ANY_DRIVER_TYPE, options, 0); + enum insmod_return ret = my_modprobe(module, ANY_DRIVER_TYPE, options, 0); if (ret != INSMOD_OK) { log_message("\t%s (marfile): failed", module); stg1_error_message("Insmod %s (marfile) failed.", module); diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c index 14374661f..768b1f2f7 100644 --- a/mdk-stage1/tools.c +++ b/mdk-stage1/tools.c @@ -294,8 +294,8 @@ int get_disks(char *** names, char *** models) char ** ptr; int count = 0; - my_insmod("ide_disk", ANY_DRIVER_TYPE, NULL, 0); - my_insmod("sd_mod", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("ide_disk", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("sd_mod", ANY_DRIVER_TYPE, NULL, 0); get_medias(DISK, names, models, BUS_ANY); @@ -315,8 +315,8 @@ int get_cdroms(char *** names, char *** models) char ** ptr; int count = 0; - my_insmod("ide_cd_mod", ANY_DRIVER_TYPE, NULL, 0); - my_insmod("sr_mod", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("ide_cd_mod", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("sr_mod", ANY_DRIVER_TYPE, NULL, 0); get_medias(CDROM, names, models, BUS_ANY); @@ -334,7 +334,7 @@ char * floppy_device(void) { char ** names, ** models; int fd; - my_insmod("floppy", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("floppy", ANY_DRIVER_TYPE, NULL, 0); fd = open("/dev/fd0", O_RDONLY|O_NONBLOCK); if (fd != -1) { char drivtyp[17]; @@ -354,7 +354,7 @@ char * floppy_device(void) close(fd); } log_message("seems that you don't have a regular floppy drive"); - my_insmod("sd_mod", ANY_DRIVER_TYPE, NULL, 0); + my_modprobe("sd_mod", ANY_DRIVER_TYPE, NULL, 0); get_medias(FLOPPY, &names, &models, BUS_ANY); if (names && *names) return asprintf_("/dev/%s", *names); |