[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grub-probe detects ext4 wronly as ext2
From: |
Robert Millan |
Subject: |
Re: grub-probe detects ext4 wronly as ext2 |
Date: |
Sat, 19 Jul 2008 16:27:07 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Sat, Jul 05, 2008 at 08:36:13PM +0200, Javier Martín wrote:
> > > grub_disk_read (disk, 1 * 2, 0, sizeof (struct grub_ext2_sblock),
> > > (char *) &data->sblock);
> > > if (grub_errno)
> > > - goto fail;
> > > + EXT2_DRIVER_MOUNT_FAIL("could not read the superblock")
> >
> > This overrides the grub_errno and grub_errmsg provided by grub_disk_read and
> > replaces them with values that hide the true problem. If there was a disk
> > read error, we really want to know about it from the lower layer.
> Well, the old version did just the same (even worse, because the message
> was generic). What would be the correct path of action here? I mean, how
> can we propagate the error messages?
It shouldn't call grub_error().
> fail:
> - grub_error (GRUB_ERR_BAD_FS, "not an ext2 filesystem");
> + if (!err_msg)
> + err_msg = "DEBUG: mount failed but no error message supplied!";
No need to check for consistency in your own code. This might be a good
practice in userland programs but here it's a waste of space. Just make sure
your code is correct.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
- Re: grub-probe detects ext4 wronly as ext2, (continued)
- Re: grub-probe detects ext4 wronly as ext2, Robert Millan, 2008/07/05
- Re: grub-probe detects ext4 wronly as ext2, Javier Martín, 2008/07/05
- Re: grub-probe detects ext4 wronly as ext2, Javier Martín, 2008/07/16
- Re: grub-probe detects ext4 wronly as ext2, Felix Zielcke, 2008/07/16
- Re: grub-probe detects ext4 wronly as ext2, Javier Martín, 2008/07/16
- Re: grub-probe detects ext4 wronly as ext2, Felix Zielcke, 2008/07/16
- Re: grub-probe detects ext4 wronly as ext2, Felix Zielcke, 2008/07/16
- Re: grub-probe detects ext4 wronly as ext2, Felix Zielcke, 2008/07/16
- Re: grub-probe detects ext4 wronly as ext2, Javier Martín, 2008/07/16
- Re: grub-probe detects ext4 wronly as ext2, Felix Zielcke, 2008/07/16
- Re: grub-probe detects ext4 wronly as ext2,
Robert Millan <=