On Wed, Feb 22, 2012 at 01:16:39PM -0500, Kenneth R Westerback wrote:
> On Wed, Feb 22, 2012 at 06:28:19PM +0200, Alexey Vatchenko wrote:
> > On Wed, Feb 22, 2012 at 5:00 PM, Kenneth R Westerback
> > <kwesterb...@rogers.com> wrote:
> > > This seems to be the difference between fsck_msdos and fsck_ffs that lets
> > > fsck_msdos incorrectly use the block device.
> > >
> > > This still works on my 512-byte sector msdos fs and uses the raw
> > > device. I think it will make your fsck/fsck_msdos behaviour consistant.
> > >
> > > Then we can figure out if fsck_msdos can ever work with devices of sector
> > > sizes other than 512 bytes.
> > >
> > > Index: main.c
> > > ===================================================================
> > > RCS file: /cvs/src/sbin/fsck_msdos/main.c,v
> > > retrieving revision 1.17
> > > diff -u -p -r1.17 main.c
> > > --- main.c ? ? ?12 Aug 2010 15:26:34 -0000 ? ? ?1.17
> > > +++ main.c ? ? ?22 Feb 2012 14:42:08 -0000
> > > @@ -98,7 +98,7 @@ main(int argc, char *argv[])
> > >
> > > ? ? ? ?while (argc-- > 0) {
> > > ? ? ? ? ? ? ? ?setcdevname(*argv, NULL, preen);
> > > - ? ? ? ? ? ? ? erg = checkfilesys(*argv++);
> > > + ? ? ? ? ? ? ? erg = checkfilesys(blockcheck(*argv++));
> > > ? ? ? ? ? ? ? ?if (erg > ret)
> > > ? ? ? ? ? ? ? ? ? ? ? ?ret = erg;
> > > ? ? ? ?}
> > 
> > $ sudo ./fsck_msdos /dev/rsd6j
> > ** /dev/rsd6j
> > could not read boot block (Invalid argument)$
> 
> But what does './fsck_msdos /dev/sd6j' do?

Ah, sorry. Now, it does the same as with raw device.

$ sudo ./fsck_msdos /dev/sd6j
** /dev/rsd6j
could not read boot block (Invalid argument)$

Reply via email to