From 41882e52fb846505e6674dfe03e0ffd75a7f141f Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 30 Apr 1995 15:14:34 +0000 Subject: [PATCH] Change dsioctl() interface to allow DIOCSYNCSLICEINFO to update the caller's slice pointer and to print the device name in error messages. --- sys/dev/vn/vn.c | 5 +++-- sys/i386/isa/wd.c | 6 +++--- sys/scsi/sd.c | 6 +++--- sys/sys/diskslice.h | 6 +++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c index 189bb0e1073a..310b8e54eb26 100644 --- a/sys/dev/vn/vn.c +++ b/sys/dev/vn/vn.c @@ -403,8 +403,9 @@ 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(dev, cmd, data, flag, vn->sc_slices, - vnstrategy, (ds_setgeom_t *)NULL); + error = dsioctl("vn", dev, cmd, data, flag, + &vn->sc_slices, vnstrategy, + (ds_setgeom_t *)NULL); if (error != -1) return (error); } diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c index 8335832e8b12..557aa2d224da 100644 --- a/sys/i386/isa/wd.c +++ b/sys/i386/isa/wd.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $Id: wd.c,v 1.75 1995/04/24 04:32:31 dyson Exp $ + * $Id: wd.c,v 1.77 1995/04/24 05:12:29 phk Exp $ */ /* TODO: @@ -1565,8 +1565,8 @@ wdioctl(dev_t dev, int cmd, caddr_t addr, int flags, struct proc *p) du = wddrives[lunit]; wdsleep(du->dk_ctrlr, "wdioct"); - error = dsioctl(dev, cmd, addr, flags, du->dk_slices, wdstrategy1, - (ds_setgeom_t *)NULL); + error = dsioctl("wd", dev, cmd, addr, flags, &du->dk_slices, + wdstrategy1, (ds_setgeom_t *)NULL); if (error != -1) return (error); diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index dfe8997a57c1..338c48b89201 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992 * - * $Id: sd.c,v 1.60 1995/04/23 22:07:53 gibbs Exp $ + * $Id: sd.c,v 1.61 1995/04/29 17:52:44 dufault Exp $ */ #define SPLSD splbio @@ -575,8 +575,8 @@ sd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, if (cmd == DIOCSBAD) return (EINVAL); /* XXX */ - error = dsioctl(dev, cmd, addr, flag, sd->dk_slices, sdstrategy1, - (ds_setgeom_t *)NULL); + error = dsioctl("sd", dev, cmd, addr, flag, &sd->dk_slices, + sdstrategy1, (ds_setgeom_t *)NULL); if (error != -1) return (error); if (PARTITION(dev) != RAW_PART && !SCSI_SUPER(dev)) diff --git a/sys/sys/diskslice.h b/sys/sys/diskslice.h index 4dd597bf3881..c7059c709963 100644 --- a/sys/sys/diskslice.h +++ b/sys/sys/diskslice.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: diskslice.h,v 1.5 1995/03/04 11:05:44 bde Exp $ + * $Id: diskslice.h,v 1.6 1995/04/24 17:07:08 bde Exp $ */ #ifndef _SYS_DISKSLICE_H_ @@ -74,8 +74,8 @@ void dsclose __P((dev_t dev, int mode, struct diskslices *ssp)); void dsgone __P((struct diskslices **sspp)); int dsinit __P((char *dname, dev_t dev, d_strategy_t *strat, struct disklabel *lp, struct diskslices **sspp)); -int dsioctl __P((dev_t dev, int cmd, caddr_t data, int flags, - struct diskslices *ssp, d_strategy_t *strat, +int dsioctl __P((char *dname, dev_t dev, int cmd, caddr_t data, int flags, + struct diskslices **sspp, d_strategy_t *strat, ds_setgeom_t *setgeom)); int dsisopen __P((struct diskslices *ssp)); char *dsname __P((char *dname, int unit, int slice, int part,