support DIOCMWEDGES ioctl
This commit is contained in:
parent
2f301a00a7
commit
700624d2ac
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ace_ebus.c,v 1.13 2014/08/10 16:44:33 tls Exp $ */
|
||||
/* $NetBSD: ace_ebus.c,v 1.14 2014/11/09 10:10:08 mlelstv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.13 2014/08/10 16:44:33 tls Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.14 2014/11/09 10:10:08 mlelstv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -2278,6 +2278,15 @@ aceioctl(dev_t dev, u_long xfer, void *addr, int flag, struct lwp *l)
|
|||
return dkwedge_list(&ace->sc_dk, dkwl, l);
|
||||
}
|
||||
|
||||
case DIOCMWEDGES:
|
||||
{
|
||||
if ((flag & FWRITE) == 0)
|
||||
return EBADF;
|
||||
|
||||
dkwedge_discover(&ace->sc_dk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
case DIOCGSTRATEGY:
|
||||
{
|
||||
struct disk_strategy *dks = (void *)addr;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: flash_ebus.c,v 1.11 2014/08/10 16:44:33 tls Exp $ */
|
||||
/* $NetBSD: flash_ebus.c,v 1.12 2014/11/09 10:10:08 mlelstv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.11 2014/08/10 16:44:33 tls Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.12 2014/11/09 10:10:08 mlelstv Exp $");
|
||||
|
||||
/* Driver for the Intel 28F320/640/128 (J3A150) StrataFlash memory device
|
||||
* Extended to include the Intel JS28F256P30T95.
|
||||
|
@ -2195,6 +2195,15 @@ eflashioctl(dev_t dev, u_long xfer, void *addr, int flag, struct lwp *l)
|
|||
return (dkwedge_list(&sc->sc_dk, dkwl, l));
|
||||
}
|
||||
|
||||
case DIOCMWEDGES:
|
||||
{
|
||||
if ((flag & FWRITE) == 0)
|
||||
return (EBADF);
|
||||
|
||||
dkwedge_discover(&sc->sc_dk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
case DIOCGSTRATEGY:
|
||||
{
|
||||
struct disk_strategy *dks = (void *)addr;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ed_mca.c,v 1.58 2014/08/10 16:44:35 tls Exp $ */
|
||||
/* $NetBSD: ed_mca.c,v 1.59 2014/11/09 10:10:08 mlelstv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.58 2014/08/10 16:44:35 tls Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.59 2014/11/09 10:10:08 mlelstv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -602,6 +602,15 @@ edmcaioctl(dev_t dev, u_long xfer, void *addr, int flag, struct lwp *l)
|
|||
return (dkwedge_list(&ed->sc_dk, dkwl, l));
|
||||
}
|
||||
|
||||
case DIOCMWEDGES:
|
||||
{
|
||||
if ((flag & FWRITE) == 0)
|
||||
return (EBADF);
|
||||
|
||||
dkwedge_discover(&ed->sc_dk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
default:
|
||||
return ENOTTY;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mscp_disk.c,v 1.81 2014/07/25 08:10:37 dholland Exp $ */
|
||||
/* $NetBSD: mscp_disk.c,v 1.82 2014/11/09 10:10:08 mlelstv Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1988 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
|
@ -82,7 +82,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.81 2014/07/25 08:10:37 dholland Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.82 2014/11/09 10:10:08 mlelstv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
|
@ -530,6 +530,15 @@ raioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
|
|||
return (dkwedge_list(&ra->ra_disk, dkwl, l));
|
||||
}
|
||||
|
||||
case DIOCMWEDGES:
|
||||
{
|
||||
if ((flag & FWRITE) == 0)
|
||||
return (EBADF);
|
||||
|
||||
dkwedge_discover(&ra->ra_disk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
default:
|
||||
error = ENOTTY;
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ofdisk.c,v 1.47 2014/07/25 08:10:37 dholland Exp $ */
|
||||
/* $NetBSD: ofdisk.c,v 1.48 2014/11/09 10:10:08 mlelstv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.47 2014/07/25 08:10:37 dholland Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.48 2014/11/09 10:10:08 mlelstv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
|
@ -473,6 +473,18 @@ ofdisk_ioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
|
|||
return (dkwedge_list(&of->sc_dk, dkwl, l));
|
||||
}
|
||||
|
||||
case DIOCMWEDGES:
|
||||
{
|
||||
if (OFDISK_FLOPPY_P(of))
|
||||
return (ENOTTY);
|
||||
|
||||
if ((flag & FWRITE) == 0)
|
||||
return (EBADF);
|
||||
|
||||
dkwedge_discover(&of->sc_dk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
default:
|
||||
return ENOTTY;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rl.c,v 1.45 2014/07/25 08:10:38 dholland Exp $ */
|
||||
/* $NetBSD: rl.c,v 1.46 2014/11/09 10:10:08 mlelstv Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
|
||||
|
@ -43,7 +43,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.45 2014/07/25 08:10:38 dholland Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.46 2014/11/09 10:10:08 mlelstv Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
|
@ -535,6 +535,14 @@ rlioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
|
|||
return dkwedge_list(&rc->rc_disk, dkwl, l);
|
||||
}
|
||||
|
||||
case DIOCMWEDGES: {
|
||||
if ((flag & FWRITE) == 0)
|
||||
return (EBADF);
|
||||
|
||||
dkwedge_discover(&rc->rc_disk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
default:
|
||||
err = ENOTTY;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue