summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2006-08-27 23:50:53 +0000
committerchristos <christos@NetBSD.org>2006-08-27 23:50:53 +0000
commit72c8baf57c59309aa4517c5bf8041397027da73e (patch)
treed67d41c34c5b28ae44e9d610d02f0e49be0baa5f /sys/dev
parent2be4cd5c0804e2fb6e665c0182d57ab9f4092a3a (diff)
Add missing initializer
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata.c6
-rw-r--r--sys/dev/ata/wd.c12
2 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c
index 6afc42ef206..068f6833c3c 100644
--- a/sys/dev/ata/ata.c
+++ b/sys/dev/ata/ata.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ata.c,v 1.74 2006/03/29 04:16:48 thorpej Exp $ */
+/* $NetBSD: ata.c,v 1.75 2006/08/27 23:50:53 christos Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.74 2006/03/29 04:16:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.75 2006/08/27 23:50:53 christos Exp $");
#ifndef ATADEBUG
#define ATADEBUG
@@ -100,7 +100,7 @@ dev_type_ioctl(atabusioctl);
const struct cdevsw atabus_cdevsw = {
atabusopen, atabusclose, noread, nowrite, atabusioctl,
- nostop, notty, nopoll, nommap, nokqfilter,
+ nostop, notty, nopoll, nommap, nokqfilter, D_OTHER
};
extern struct cfdriver atabus_cd;
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 27aa83617cd..170bc0fbbbe 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.327 2006/08/01 07:19:07 lukem Exp $ */
+/* $NetBSD: wd.c,v 1.328 2006/08/27 23:50:53 christos Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.327 2006/08/01 07:19:07 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.328 2006/08/27 23:50:53 christos Exp $");
#ifndef ATADEBUG
#define ATADEBUG
@@ -1161,6 +1161,14 @@ wdioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct lwp *l)
return EIO;
switch (xfer) {
+ case DIOCGMEDIASIZE:
+ *(off_t *)addr = (off_t)wd->sc_capacity * DEV_BSIZE;
+ return 0;
+
+ case DIOCGSECTORSIZE:
+ *(u_int *)addr = DEV_BSIZE;
+ return 0;
+
#ifdef HAS_BAD144_HANDLING
case DIOCSBAD:
if ((flag & FWRITE) == 0)