[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Change in fsys_reiserfs.c

From: Jochen Hoenicke
Subject: Change in fsys_reiserfs.c
Date: Mon, 2 Oct 2000 18:10:45 +0200 (MET DST)

Hello Okuji,

>From the commit mailing list:
> CVSROOT:      /home/cvs
> Module name:  grub
> Changes by:   OKUJI Yoshinori <address@hidden>        00/09/29 11:55:28
> [...]
> Log message:
>       add new commands, partnew and parttype, add one more sanity check for 
> reiserfs.
> CVSWeb URLs:
> http://subversions.gnu.org/cgi-bin/cvsweb/grub/stage2/fsys_reiserfs.c.diff?r1=1.6&r2=1.7

>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) >> 

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]