--- ipl.c 2004-01-01 16:25:47.339568000 +0100 +++ ipl.c.new 2004-01-01 16:24:48.429568000 +0100 @@ -278,8 +278,6 @@ started_wide ? "wide" : "narrow"); if (Debug) printf("initial-sp %p\n", initialstackptr); - restart: - blocked_bootdev = pdc_bootdev_open(); bootdev = byteio_open(blocked_bootdev); @@ -326,7 +324,8 @@ if (f.cmdline[0] == '\0') /* no command line specified */ { die("ERROR: No command line on boot media\n"); - goto restart; + interactive=1; + goto interactive_loop; } /* add the right console= if there isn't one yet */ @@ -393,9 +392,18 @@ } } + interactive_loop: + if (interactive) interact(&f); + if (f.cmdline[0] == '\0') /* no command line specified */ + { + die("ERROR: No command line on boot media\n"); + interactive=1; + goto interactive_loop; + } + strcpy(commandline, parse(f.cmdline, &kern_part, kern_name, &rd_part, rd_name)); @@ -439,14 +447,16 @@ { printf("ERROR: Requesting kernel from partition %d " "on unpartitioned media!\n", kern_part); - while(1); + interactive=1; + goto interactive_loop; } if (rd_part != -1 && rd_part != kern_part) { die("ERROR:: palo does not support ramdisk on different" " partition than kernel\n"); - goto restart; + interactive=1; + goto interactive_loop; } if (kern_part == 0) @@ -461,7 +471,8 @@ if (f.kern32_sz == 0) { die("Error: can't find a 32-bit kernel here"); - goto restart; + interactive=1; + goto interactive_loop; } kernfd = offset_open(bootdev, f.kern32_offset, f.kern32_sz); } @@ -470,7 +481,8 @@ if (f.kern64_sz == 0) { die("Error: can't find a 64-bit kernel here"); - goto restart; + interactive=1; + goto interactive_loop; } kernfd = offset_open(bootdev, f.kern64_offset, f.kern64_sz); } @@ -502,7 +514,8 @@ else { die("No kernels found."); - goto restart; + interactive=1; + goto interactive_loop; } } @@ -523,7 +536,8 @@ if (!load_kernel(kernfd, &entry, &wide)) { die("ERROR: failed to load kernel\n"); - goto restart; + interactive=1; + goto interactive_loop; } if (rd_part != -1) @@ -548,7 +562,8 @@ (partition[kern_part - 1].id != 0x83 && partition[kern_part - 1].id != 0xfd && partition[kern_part - 1].id != 0xf0) ) { printf("ERROR: Partition %d must be ext2\n", kern_part); - while(1); + interactive=1; + goto interactive_loop; } pp = &partition[kern_part - 1]; @@ -565,14 +580,16 @@ { printf("ERROR: open %s from partition %d failed\n", kern_name, kern_part); - while(1); + interactive=1; + goto interactive_loop; } bkern_fd = byteio_open(kern_fd); if (!load_kernel(bkern_fd, &entry, &wide)) { die("ERROR: failed to load kernel\n"); - goto restart; + interactive=1; + goto interactive_loop; } if (rd_part != -1) @@ -593,8 +610,10 @@ /* FIXME!!! need to pass command line to kernel */ /* could theoretically use a function pointer, but they're ugly on PA */ - if(pdc_default_width(wide)) - goto restart; + if(pdc_default_width(wide)) { + interactive=1; + goto interactive_loop; + } printf("Branching to kernel entry point 0x%08x. If this is the last\n" "message you see, you may need to switch your console. This is\n" "a common symptom -- search the FAQ and mailing list at parisc-linux.org\n\n",