From: "Jochen Hoenicke" <[EMAIL PROTECTED]>
Subject: Change in fsys_reiserfs.c
Date: Mon, 2 Oct 2000 18:10:45 +0200 (MET DST)

> >From the diff:
> -  if (! devread (superblock, 0, sizeof (struct reiserfs_super_block), 
> +  if (part_length < sizeof (struct reiserfs_super_block)
> +      || ! devread (superblock, 0, sizeof (struct reiserfs_super_block), 
> 
> First, the check is wrong, it should be:
>   part_length <= superblock + (sizeof (struct reiserfs_super_block) >> SECTOR_SHIFT)

  Thanks for pointing it out. I'll fix it.

> Second, devread already does the part_length check and returns with
> errnum = ERR_OUTSIDE_PART if the partition is too small.  If you just
> want to avoid the error message, I think it is cleaner to reset errnum
> if devread failed.  Or attempt_mount could clear errnum after each
> failed attempt.

  I disagree. The idea behind that is that we want to detect fatal
errors (e.g. we can't read the disk at all), while we want to ignore
that a partition doesn't have a certain filesystem. This is required
for detecting the filesystem of a partition automatically (if any),
and it is difficult to know what the error means in upper layeres. So
mount functions shouldn't set ERRNUM unnecessarily.

Okuji

_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub

Reply via email to