diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-07-06 17:28:01 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-07-06 17:28:01 +0000 |
commit | 310253e7fcab4d8fe72c7be76ecae1ae30afced6 (patch) | |
tree | 2f8435ee986756df04f4a3a5a666d618e13776b5 | |
parent | a74545d3d4dbfad8636b7917a776202eb5906c69 (diff) |
vndsize() can just return -1; we don't support swapping to vnd
anymore.
-rw-r--r-- | sys/dev/vnd.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 9ff9c03a1ec..a1752bf3aa2 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.141 2011/07/06 17:26:33 matthew Exp $ */ +/* $OpenBSD: vnd.c,v 1.142 2011/07/06 17:28:00 matthew Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -673,18 +673,13 @@ vndclear(struct vnd_softc *sc) daddr64_t vndsize(dev_t dev) { - int unit = DISKUNIT(dev); - struct vnd_softc *sc = &vnd_softc[unit]; - - if (unit >= numvnd || (sc->sc_flags & VNF_INITED) == 0) - return (-1); - return (sc->sc_size * (sc->sc_secsize / DEV_BSIZE)); + /* We don't support swapping to vnd anymore. */ + return (-1); } int vnddump(dev_t dev, daddr64_t blkno, caddr_t va, size_t size) { - /* Not implemented. */ return (ENXIO); } |