"Crist J. Clark" <[EMAIL PROTECTED]> wrote:

> Have a crash box handy?
>   $ disklabel fd0.1440

The patch below should fix that, thanks for the bug report.

fdioctl() historically attempted to determine the "raw" partition
(`c') of the device in order to read the label.  However, the floppy
driver never really supported UFS-style partitions anyway.  This ended
up in selecting the wrong device for reading the label, which was a
not-so-fatal error before the last floppy driver rewrite (it actually
selected the fdX.1480 device then, which was obviously benign for 3.5"
drives).  However, now it hits an unitialized device which becomes
fatal in readdisklabel() by attempting an indirect call to the
strategy routine that hasn't been entered in the struct dev passed

The call to dkmodpart() entered in rev. 1.64 of fd.c, so i'm Cc'ing
Bruce for a comment whether the fix below is indeed TRT.

Index: sys/isa/fd.c
RCS file: /home/ncvs/src/sys/isa/fd.c,v
retrieving revision 1.224
diff -u -r1.224 fd.c
--- isa/fd.c    18 Dec 2001 22:16:33 -0000      1.224
+++ isa/fd.c    1 Apr 2002 20:56:22 -0000
@@ -2704,7 +2704,7 @@
                fdt = fd->ft;
                lp->d_secpercyl = fdt->size / fdt->tracks;
                lp->d_type = DTYPE_FLOPPY;
-               if (readdisklabel(dkmodpart(dev, RAW_PART), lp) != NULL)
+               if (readdisklabel(dev, lp) != NULL)
                        error = EINVAL;
                        *(struct disklabel *)addr = *lp;

cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to