diff --git a/ChangeLog b/ChangeLog index a4d8fca26..5a1430517 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-10-31 OKUJI Yoshinori + + * grub/asmstub.c (init_device_map): Add a floppy device name + into the device map file even if check_device fails. + * stage2/char_io.c [!STAGE1_5] (get_cmdline): Clear ERRNUM after + calling print_completions. + 1999-10-29 OKUJI Yoshinori * stage2/asm.S (track_int13): Defined unconditionally. Do not diff --git a/grub/asmstub.c b/grub/asmstub.c index 6e10ee04e..e5aab9638 100644 --- a/grub/asmstub.c +++ b/grub/asmstub.c @@ -341,14 +341,13 @@ init_device_map (void) break; get_floppy_disk_name (name, i); + /* In floppies, write the map, whether check_device succeeds + or not, because the user just does not insert floppies. */ + if (fp) + fprintf (fp, "(fd%d)\t%s\n", i, name); + if (check_device (name)) - { - assign_device_name (i, name); - - /* If the device map file is opened, write the map. */ - if (fp) - fprintf (fp, "(fd%d)\t%s\n", i, name); - } + assign_device_name (i, name); } /* IDE disks. */ diff --git a/stage2/char_io.c b/stage2/char_io.c index d2018d08d..a3a95fd78 100644 --- a/stage2/char_io.c +++ b/stage2/char_io.c @@ -408,7 +408,8 @@ get_cmdline (char *prompt, char *cmdline, int maxlen, grub_memmove (completion_buffer, buf + i, lpos - i); completion_buffer[lpos - i] = 0; ret = print_completions (is_filename, 1); - + errnum = ERR_NONE; + if (ret >= 0) { /* Found, so insert COMPLETION_BUFFER. */ diff --git a/stage2/disk_io.c b/stage2/disk_io.c index e608bb082..9a8bf7547 100644 --- a/stage2/disk_io.c +++ b/stage2/disk_io.c @@ -1055,7 +1055,7 @@ print_completions (int is_filename, int is_completion) { errnum = 0; - if (*buf != '/' && (incomplete || ! *ptr)) + if (*buf == '(' && (incomplete || ! *ptr)) { if (! part_choice) { @@ -1142,7 +1142,7 @@ print_completions (int is_filename, int is_completion) } } } - else if (*ptr == '/') + else if (ptr && *ptr == '/') { /* filename completions */ if (! is_completion)