summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-fd.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2000-01-29 14:10:59 +0000
committersos <sos@FreeBSD.org>2000-01-29 14:10:59 +0000
commit027422c351183c1dfcd26b9d1bd19cfed4054dce (patch)
tree23090d24bdab8662564bcf3b75248f69505368f7 /sys/dev/ata/atapi-fd.c
parent1a453ea9ce7aed4d1177748f328fa3baf181524d (diff)
downloadFreeBSD-src-027422c351183c1dfcd26b9d1bd19cfed4054dce.zip
FreeBSD-src-027422c351183c1dfcd26b9d1bd19cfed4054dce.tar.gz
cosmetic changes only.
Diffstat (limited to 'sys/dev/ata/atapi-fd.c')
-rw-r--r--sys/dev/ata/atapi-fd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c
index 1217332..5358afb 100644
--- a/sys/dev/ata/atapi-fd.c
+++ b/sys/dev/ata/atapi-fd.c
@@ -211,15 +211,17 @@ static int
afdopen(dev_t dev, int32_t flags, int32_t fmt, struct proc *p)
{
struct afd_softc *fdp = dev->si_drv1;
- struct disklabel *label;
+ struct disklabel *label = &fdp->disk.d_label;
atapi_test_ready(fdp->atp);
+
afd_prevent_allow(fdp, 1);
+
if (afd_sense(fdp))
printf("afd%d: sense media type failed\n", fdp->lun);
fdp->atp->flags &= ~ATAPI_F_MEDIA_CHANGED;
- label = &fdp->disk.d_label;
+
bzero(label, sizeof *label);
label->d_secsize = fdp->cap.sector_size;
label->d_nsectors = fdp->cap.sectors;
OpenPOWER on IntegriCloud