summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev/fd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-08-13 15:23:14 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-08-13 15:23:14 +0000
commitcf6459c8f783ece5445be14e8e2e7201f7cd6632 (patch)
treea5a86e9615b432c0d3ef13f965013ddf06ea6bff /sys/arch/sparc/dev/fd.c
parent46faf138ca97f0462a1c22674098875302fe10d0 (diff)
Replace the error strings that were being passed around with much simpler
errnos. Note that the error strings are being ignored, since we long ago decided to not spam the console, and there is no other nice way to use the errors (without changing the ioctls to pass it back) The errno is now useful, since we can pass b_error from failing IO up, and the drive can decide how to use that ok miod
Diffstat (limited to 'sys/arch/sparc/dev/fd.c')
-rw-r--r--sys/arch/sparc/dev/fd.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c
index 9c99fad9d59..070f4c029e1 100644
--- a/sys/arch/sparc/dev/fd.c
+++ b/sys/arch/sparc/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.65 2009/07/24 08:07:39 blambert Exp $ */
+/* $OpenBSD: fd.c,v 1.66 2009/08/13 15:23:12 deraadt Exp $ */
/* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */
/*-
@@ -237,7 +237,7 @@ struct cfdriver fd_cd = {
NULL, "fd", DV_DISK
};
-void fdgetdisklabel(dev_t, struct fd_softc *, struct disklabel *, int);
+int fdgetdisklabel(dev_t, struct fd_softc *, struct disklabel *, int);
int fd_get_parms(struct fd_softc *);
void fdstrategy(struct buf *);
void fdstart(struct fd_softc *);
@@ -1931,12 +1931,10 @@ fdformat(dev, finfo, p)
return (rv);
}
-void
+int
fdgetdisklabel(dev_t dev, struct fd_softc *fd, struct disklabel *lp,
int spoofonly)
{
- char *errstring;
-
bzero(lp, sizeof(struct disklabel));
lp->d_type = DTYPE_FLOPPY;
@@ -1960,10 +1958,7 @@ fdgetdisklabel(dev_t dev, struct fd_softc *fd, struct disklabel *lp,
/*
* Call the generic disklabel extraction routine.
*/
- errstring = readdisklabel(DISKLABELDEV(dev), fdstrategy, lp, spoofonly);
- if (errstring) {
- /*printf("%s: %s\n", fd->sc_dv.dv_xname, errstring);*/
- }
+ return readdisklabel(DISKLABELDEV(dev), fdstrategy, lp, spoofonly);
}
void