diff --git a/ChangeLog b/ChangeLog index 8ba480381..b8321c54d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-02-24 OKUJI Yoshinori + + * stage2/disk_io.c [!STAGE1_5] (print_fsys_type): Mask + CURRENT_SLICE with 0xFF when printing the partition type. + + * grub/asmstub.c [__linux__]: Include for the + definition FLOPPY_MAJOR. + (check_device) [__linux__]: Skip the HDIO_GETGEO ioctl if the + major number of ST.ST_RDEV is FLOPPY_MAJOR. + 2000-02-21 OKUJI Yoshinori * stage2/disk_io.c (check_BSD_parts) [!STAGE1_5]: Use the term diff --git a/grub/asmstub.c b/grub/asmstub.c index 3db358048..f43453906 100644 --- a/grub/asmstub.c +++ b/grub/asmstub.c @@ -43,6 +43,7 @@ int grub_stage2 (void); #ifdef __linux__ # include /* ioctl */ # include /* HDIO_GETGEO */ +# include /* FLOPPY_MAJOR */ # if (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)) /* Maybe libc doesn't have large file support. */ # include /* _llseek */ @@ -526,8 +527,12 @@ check_device (const char *device) if (fstat (fileno (fp), &st)) return 0; - - if (S_ISBLK (st.st_mode) && ioctl (fileno (fp), HDIO_GETGEO, &hdg)) + + /* If it is a block device and isn't a floppy, check if HDIO_GETGEO + succeeds. */ + if (S_ISBLK (st.st_mode) + && MAJOR (st.st_rdev) != FLOPPY_MAJOR + && ioctl (fileno (fp), HDIO_GETGEO, &hdg)) return 0; } #endif /* __linux__ */ diff --git a/stage2/disk_io.c b/stage2/disk_io.c index 3e39ff2e8..f4d1868c5 100644 --- a/stage2/disk_io.c +++ b/stage2/disk_io.c @@ -1002,7 +1002,7 @@ print_fsys_type (void) if (current_partition == 0xFFFFFF) printf ("using whole disk\n"); else - printf ("partition type 0x%x\n", current_slice); + printf ("partition type 0x%x\n", current_slice & 0xFF); } } #endif /* STAGE1_5 */