summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-08-28 14:33:44 +0000
committerphk <phk@FreeBSD.org>1999-08-28 14:33:44 +0000
commit9c72381e09a5593df856423c995563779f7535e8 (patch)
tree3471f1e5faa7dd2bf47573f428c3a46114bac456 /sys/dev
parenta261857e2d7ff67439a916b9f0b8db5e91302af0 (diff)
downloadFreeBSD-src-9c72381e09a5593df856423c995563779f7535e8.zip
FreeBSD-src-9c72381e09a5593df856423c995563779f7535e8.tar.gz
We don't need to pass the diskname argument all over the diskslice/label
code, we can find the name from any convenient dev_t
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata-disk.c4
-rw-r--r--sys/dev/ata/atapi-fd.c4
-rw-r--r--sys/dev/ida/ida_disk.c4
-rw-r--r--sys/dev/vn/vn.c6
4 files changed, 8 insertions, 10 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index d8196a4..ba28db5 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -302,7 +302,7 @@ printf("adopen: lun=%d adnlun=%d\n", lun, adnlun);
label.d_secpercyl = adp->sectors * adp->heads;
label.d_secperunit = adp->total_secs;
- error = dsopen("ad", dev, fmt, 0, &adp->slices, &label);
+ error = dsopen(dev, fmt, 0, &adp->slices, &label);
adp->flags &= ~AD_F_LABELLING;
ad_sleep(adp, "adop2");
@@ -336,7 +336,7 @@ adioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flags, struct proc *p)
return ENXIO;
ad_sleep(adp, "adioct");
- error = dsioctl("sd", dev, cmd, addr, flags, &adp->slices);
+ error = dsioctl(dev, cmd, addr, flags, &adp->slices);
if (error != ENOIOCTL)
return error;
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c
index 5a2fd18..7191f79 100644
--- a/sys/dev/ata/atapi-fd.c
+++ b/sys/dev/ata/atapi-fd.c
@@ -235,7 +235,7 @@ afdopen(dev_t dev, int32_t flags, int32_t fmt, struct proc *p)
label.d_secperunit = fdp->cap.heads * fdp->cap.sectors * fdp->cap.cylinders;
/* initialize slice tables. */
- return dsopen("afd", dev, fmt, 0, &fdp->slices, &label);
+ return dsopen(dev, fmt, 0, &fdp->slices, &label);
}
static int
@@ -263,7 +263,7 @@ afdioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct proc *p)
if (lun >= afdnlun || !(fdp = afdtab[lun]))
return ENXIO;
- error = dsioctl("sd", dev, cmd, addr, flag, &fdp->slices);
+ error = dsioctl(dev, cmd, addr, flag, &fdp->slices);
if (error != ENOIOCTL)
return error;
diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c
index 24be38b..2874d25 100644
--- a/sys/dev/ida/ida_disk.c
+++ b/sys/dev/ida/ida_disk.c
@@ -144,7 +144,7 @@ idopen(dev_t dev, int flags, int fmt, struct proc *p)
label.d_secperunit = drv->secperunit;
/* Initialize slice tables. */
- error = dsopen("id", dev, fmt, 0, &drv->slices, &label);
+ error = dsopen(dev, fmt, 0, &drv->slices, &label);
return (error);
}
@@ -171,7 +171,7 @@ idioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct proc *p)
if (drv == NULL)
return (ENXIO);
- error = dsioctl("id", dev, cmd, addr, flag, &drv->slices);
+ error = dsioctl(dev, cmd, addr, flag, &drv->slices);
if (error == ENOIOCTL)
return (ENOTTY);
diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c
index 979e617..f51efca 100644
--- a/sys/dev/vn/vn.c
+++ b/sys/dev/vn/vn.c
@@ -237,8 +237,7 @@ vnopen(dev_t dev, int flags, int mode, struct proc *p)
label.d_secperunit = vn->sc_size;
label.d_partitions[RAW_PART].p_size = vn->sc_size;
- return (dsopen("vn", dev, mode, 0, &vn->sc_slices,
- &label));
+ return (dsopen(dev, mode, 0, &vn->sc_slices, &label));
}
if (dkslice(dev) != WHOLE_DISK_SLICE ||
dkpart(dev) != RAW_PART ||
@@ -393,8 +392,7 @@ vnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
IFOPT(vn,VN_LABELS) {
if (vn->sc_slices != NULL) {
- error = dsioctl("vn", dev, cmd, data, flag,
- &vn->sc_slices);
+ error = dsioctl(dev, cmd, data, flag, &vn->sc_slices);
if (error != ENOIOCTL)
return (error);
}
OpenPOWER on IntegriCloud