diff --git a/ChangeLog b/ChangeLog index d8ceb9999..31c349e8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-01-21 Robert Millan + + Fix detection of very small filesystems (like tar). + + * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to + contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than + GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's + a problem with this disk). + 2008-01-21 Robert Millan * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message diff --git a/fs/reiserfs.c b/fs/reiserfs.c index 328e2d7e2..bbd1b349a 100644 --- a/fs/reiserfs.c +++ b/fs/reiserfs.c @@ -691,6 +691,10 @@ grub_reiserfs_mount (grub_disk_t disk) return data; fail: + /* Disk is too small to contain a ReiserFS. */ + if (grub_errno == GRUB_ERR_OUT_OF_RANGE) + grub_error (GRUB_ERR_BAD_FS, "not a reiserfs filesystem"); + grub_free (data); return 0; }