mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 12:28:58 +00:00
Change dsioctl() interface to allow DIOCSYNCSLICEINFO to update the caller's
slice pointer and to print the device name in error messages.
This commit is contained in:
parent
d9908e7b10
commit
41882e52fb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8188
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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))
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user