From 72c8baf57c59309aa4517c5bf8041397027da73e Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 27 Aug 2006 23:50:53 +0000 Subject: [PATCH] Add missing initializer --- sys/dev/ata/ata.c | 6 +++--- sys/dev/ata/wd.c | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c index 6afc42ef206a..068f6833c3c0 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 -__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 27aa83617cdd..170bc0fbbbe4 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 -__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)