diff options
author | phk <phk@FreeBSD.org> | 1999-05-30 16:53:49 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-05-30 16:53:49 +0000 |
commit | 7e4a9dced9acd97789b37c32063ee7a8aa133f6d (patch) | |
tree | 407469b3581129f6442306683b28d6b54126baad /sys/dev/ata | |
parent | dfa3967ffa4d84ed0b1691fac89ba3e73b8544e0 (diff) | |
download | FreeBSD-src-7e4a9dced9acd97789b37c32063ee7a8aa133f6d.zip FreeBSD-src-7e4a9dced9acd97789b37c32063ee7a8aa133f6d.tar.gz |
This commit should be a extensive NO-OP:
Reformat and initialize correctly all "struct cdevsw".
Initialize the d_maj and d_bmaj fields.
The d_reset field was not removed, although it is never used.
I used a program to do most of this, so all the files now use the
same consistent format. Please keep it that way.
Vinum and i4b not modified, patches emailed to respective authors.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/ata-disk.c | 31 | ||||
-rw-r--r-- | sys/dev/ata/atapi-cd.c | 26 | ||||
-rw-r--r-- | sys/dev/ata/atapi-fd.c | 26 | ||||
-rw-r--r-- | sys/dev/ata/atapi-tape.c | 26 |
4 files changed, 83 insertions, 26 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index 0f00d1c..b46f770 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: ata-disk.c,v 1.10 1999/05/11 19:53:58 phk Exp $ + * $Id: ata-disk.c,v 1.11 1999/05/17 15:58:45 sos Exp $ */ #include "ata.h" @@ -62,16 +62,31 @@ static d_psize_t adpsize; #define BDEV_MAJOR 30 #define CDEV_MAJOR 116 -static struct cdevsw ad_cdevsw = { - adopen, adclose, physread, physwrite, - adioctl, nostop, nullreset, nodevtotty, #ifdef NOTYET /* the boot code needs to be fixed to boot arbitrary devices */ - seltrue, nommap, adstrategy, "ad", +#define DRIVER_NAME "ad" #else - seltrue, nommap, adstrategy, "wd", +#define DRIVER_NAME "wd" #endif - NULL, -1, nodump, adpsize, - D_DISK, 0, -1 +static struct cdevsw ad_cdevsw = { + /* open */ adopen, + /* close */ adclose, + /* read */ physread, + /* write */ physwrite, + /* ioctl */ adioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ nopoll, + /* mmap */ nommap, + /* strategy */ adstrategy, + /* name */ DRIVER_NAME, + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ adpsize, + /* flags */ D_DISK, + /* maxio */ 0, + /* bmaj */ BDEV_MAJOR, }; /* misc defines */ diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index d779c5e..aaec644 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atapi-cd.c,v 1.7 1999/05/07 07:03:13 phk Exp $ + * $Id: atapi-cd.c,v 1.8 1999/05/17 15:58:46 sos Exp $ */ #include "ata.h" @@ -63,11 +63,25 @@ static d_strategy_t acdstrategy; #define BDEV_MAJOR 31 #define CDEV_MAJOR 117 static struct cdevsw acd_cdevsw = { - acdopen, acdclose, physread, physwrite, - acdioctl, nostop, nullreset, nodevtotty, - seltrue, nommap, acdstrategy, "acd", - NULL, -1, nodump, nopsize, - D_DISK, 0, -1 + /* open */ acdopen, + /* close */ acdclose, + /* read */ physread, + /* write */ physwrite, + /* ioctl */ acdioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ nopoll, + /* mmap */ nommap, + /* strategy */ acdstrategy, + /* name */ "acd", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ D_DISK, + /* maxio */ 0, + /* bmaj */ BDEV_MAJOR }; #define NUNIT 16 /* Max # of devices */ diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c index e6bad60..d63a039 100644 --- a/sys/dev/ata/atapi-fd.c +++ b/sys/dev/ata/atapi-fd.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atapi-fd.c,v 1.7 1999/05/17 15:58:46 sos Exp $ + * $Id: atapi-fd.c,v 1.8 1999/05/20 09:12:05 sos Exp $ */ #include "ata.h" @@ -65,11 +65,25 @@ static d_strategy_t afdstrategy; #define CDEV_MAJOR 118 static struct cdevsw afd_cdevsw = { - afdopen, afdclose, physread, physwrite, - afdioctl, nostop, nullreset, nodevtotty, - seltrue, nommap, afdstrategy, "afd", - NULL, -1, nodump, nopsize, - D_DISK, 0, -1 + /* open */ afdopen, + /* close */ afdclose, + /* read */ physread, + /* write */ physwrite, + /* ioctl */ afdioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ nopoll, + /* mmap */ nommap, + /* strategy */ afdstrategy, + /* name */ "afd", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ D_DISK, + /* maxio */ 0, + /* bmaj */ BDEV_MAJOR, }; #define NUNIT 8 diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c index 43edafa..7699d89 100644 --- a/sys/dev/ata/atapi-tape.c +++ b/sys/dev/ata/atapi-tape.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atapi-tape.c,v 1.7 1999/05/07 07:03:15 phk Exp $ + * $Id: atapi-tape.c,v 1.8 1999/05/17 15:58:47 sos Exp $ */ #include "ata.h" @@ -61,11 +61,25 @@ static d_strategy_t aststrategy; #define CDEV_MAJOR 119 static struct cdevsw ast_cdevsw = { - astopen, astclose, physread, physwrite, - astioctl, nostop, nullreset, nodevtotty, - seltrue, nommap, aststrategy, "ast", - NULL, -1, nodump, nopsize, - D_TAPE, 0, -1 + /* open */ astopen, + /* close */ astclose, + /* read */ physread, + /* write */ physwrite, + /* ioctl */ astioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ nopoll, + /* mmap */ nommap, + /* strategy */ aststrategy, + /* name */ "ast", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ D_TAPE, + /* maxio */ 0, + /* bmaj */ BDEV_MAJOR }; static u_int32_t ast_total = 0; |