--- Gnu-Mach/linux/dev/drivers/block/genhd.c 2020/09/02 04:46:00 1.1.1.3 +++ Gnu-Mach/linux/dev/drivers/block/genhd.c 2020/09/02 04:48:33 1.1.1.4 @@ -27,6 +27,8 @@ #ifdef CONFIG_BLK_DEV_INITRD #include #endif +#include +#include #include @@ -768,12 +770,36 @@ static void setup_dev(struct gendisk *de void device_setup(void) { extern void console_map_init(void); + extern char *kernel_cmdline; + char *c, *param, *white; struct gendisk *p; int nr=0; #ifdef MACH linux_intr_pri = SPL6; #endif + for (c = kernel_cmdline; c; ) + { + param = strstr(c, " ide"); + if (!param) + param = strstr(c, " hd"); + if (!param) + break; + if (param) { + param++; + white = strchr(param, ' '); + if (!white) { + ide_setup(param); + c = NULL; + } else { + char *word = alloca(white - param + 1); + strncpy(word, param, white - param); + word[white-param] = '\0'; + ide_setup(word); + c = white + 1; + } + } + } #ifndef MACH chr_dev_init(); #endif