Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jul 1996 09:45:49 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        fhackers@jraynard.demon.co.uk, freebsd-hackers@FreeBSD.org
Subject:   Re: Disklabel problems
Message-ID:  <199607152345.JAA24049@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
># disklabel -B -b boot1 -s boot2 wd0

>However, this results in the error message 
>"disklabel: /dev/rwd0c: Undefined error: 0".

>As far as I can see from the code, this message only occurs if
>disklabel was unable to open the disk as a raw device, or if it could
>not read the boot area.

Error 0 means no error, so this message only occurs if disklabel has
bogus error handling.  It has 2 bogons like this:

	if (read(f, bootarea, BBSIZE) < BBSIZE)
		Perror(specdev);

/dev/rwd0c is apparently smaller than BBSIZE.  This might be caused by
the slice being smaller than BBSIZE.  The (compatibility) slice must
exist (i.e., there must be at least one FreeBSD slice) to get this far.
FreeBSD doesn't handle nonexistent partitions quite right (they can be
opened and are empty in some cases where open should probably return
ENXIO), but the `c' partition should always exist and have the same
size as the slice.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607152345.JAA24049>