SCCS-vsn: sys/vax/mba/hp.c 7.5
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)hp.c 7.4 (Berkeley) %G%
+ * @(#)hp.c 7.5 (Berkeley) %G%
mi = hpinfo[unit];
hpaddr = (struct hpdevice *)mi->mi_drv;
mi = hpinfo[unit];
hpaddr = (struct hpdevice *)mi->mi_drv;
- if (flags & O_NDELAY)
- sc->sc_state = WANTOPENRAW;
- else
- sc->sc_state = WANTOPEN;
+ sc->sc_state = WANTOPEN;
/*
* Use the default sizes until we've read the label,
* or longer if there isn't one there.
/*
* Use the default sizes until we've read the label,
* or longer if there isn't one there.
lp->d_ntracks = 20;
lp->d_secpercyl = 32*20;
lp->d_ntracks = 20;
lp->d_secpercyl = 32*20;
+ if (flags & O_NDELAY)
+ goto raw;
+
/*
* Map all ML11's to the same type. Also calculate
* transfer rates based on device characteristics.
/*
* Map all ML11's to the same type. Also calculate
* transfer rates based on device characteristics.
mi->mi_type = MBDT_ML11A;
lp->d_partitions[0].p_size = sc->sc_mlsize;
lp->d_secpercyl = sc->sc_mlsize;
mi->mi_type = MBDT_ML11A;
lp->d_partitions[0].p_size = sc->sc_mlsize;
lp->d_secpercyl = sc->sc_mlsize;
- sc->sc_state = WANTOPENRAW;
* during first read operation.
*/
if (msg = readdisklabel(dev, hpstrategy, lp)) {
* during first read operation.
*/
if (msg = readdisklabel(dev, hpstrategy, lp)) {
- if (sc->sc_state == OPENRAW)
- goto done;
if (cold)
printf(": %s", msg);
else
if (cold)
printf(": %s", msg);
else
#ifdef COMPAT_42
mi->mi_type = hpmaptype(mi, lp);
#else
#ifdef COMPAT_42
mi->mi_type = hpmaptype(mi, lp);
#else
- sc->sc_state = OPENRAW;
- goto done;
done:
wakeup((caddr_t)sc);
return (error);
done:
wakeup((caddr_t)sc);
return (error);
+
+raw:
+ sc->sc_state = OPENRAW;
+ wakeup((caddr_t)sc);
+ return (error);