Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev actually, put the old definitions back into vndvar.h...
details: https://anonhg.NetBSD.org/src/rev/9396601bf650
branches: trunk
changeset: 757725:9396601bf650
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Sep 19 09:41:37 2010 +0000
description:
actually, put the old definitions back into vndvar.h, under _KERNEL,
as netbsd32 wants access to them.
diffstat:
sys/dev/vnd.c | 35 +++--------------------------------
sys/dev/vndvar.h | 35 ++++++++++++++++++++++++++++++++++-
2 files changed, 37 insertions(+), 33 deletions(-)
diffs (111 lines):
diff -r 986fa02992a7 -r 9396601bf650 sys/dev/vnd.c
--- a/sys/dev/vnd.c Sun Sep 19 09:09:30 2010 +0000
+++ b/sys/dev/vnd.c Sun Sep 19 09:41:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.212 2010/09/19 07:11:42 mrg Exp $ */
+/* $NetBSD: vnd.c,v 1.213 2010/09/19 09:41:37 mrg Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.212 2010/09/19 07:11:42 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.213 2010/09/19 09:41:37 mrg Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vnd.h"
@@ -195,33 +195,6 @@
#define VNDLABELDEV(dev) \
(MAKEDISKDEV(major((dev)), vndunit((dev)), RAW_PART))
-#ifdef COMPAT_30
-struct vnd_user30 {
- int vnu_unit; /* which vnd unit */
- uint32_t vnu_dev; /* file is on this device... */
- uint32_t vnu_ino; /* ...at this inode */
-};
-#define VNDIOCGET30 _IOWR('F', 2, struct vnd_user30) /* get list */
-#endif
-
-#ifdef COMPAT_50
-struct vnd_user50 {
- int vnu_unit; /* which vnd unit */
- uint32_t vnu_dev; /* file is on this device... */
- ino_t vnu_ino; /* ...at this inode */
-};
-#define VNDIOCGET50 _IOWR('F', 3, struct vnd_user50) /* get list */
-
-struct vnd_ioctl50 {
- char *vnd_file; /* pathname of file to mount */
- int vnd_flags; /* flags; see below */
- struct vndgeom vnd_geom; /* geometry to emulate */
- unsigned int vnd_size; /* (returned) size of disk */
-};
-#define VNDIOCSET50 _IOWR('F', 0, struct vnd_ioctl50)
-#define VNDIOCCLR50 _IOW('F', 1, struct vnd_ioctl50)
-#endif
-
/* called by main() at boot time */
void vndattach(int);
@@ -1073,10 +1046,8 @@
switch (cmd) {
case VNDIOCSET:
case VNDIOCCLR:
-#ifdef VNDIOCSET50
+#ifdef COMPAT_50
case VNDIOCSET50:
-#endif
-#ifdef VNDIOCCLR50
case VNDIOCCLR50:
#endif
case DIOCSDINFO:
diff -r 986fa02992a7 -r 9396601bf650 sys/dev/vndvar.h
--- a/sys/dev/vndvar.h Sun Sep 19 09:09:30 2010 +0000
+++ b/sys/dev/vndvar.h Sun Sep 19 09:41:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vndvar.h,v 1.28 2010/09/19 07:11:42 mrg Exp $ */
+/* $NetBSD: vndvar.h,v 1.29 2010/09/19 09:41:37 mrg Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -210,4 +210,37 @@
#define VNDIOCCLR _IOW('F', 1, struct vnd_ioctl) /* disable disk */
#define VNDIOCGET _IOWR('F', 3, struct vnd_user) /* get list */
+#ifdef _KERNEL
+/*
+ * Everything else is kernel-private, mostly exported for compat/netbsd32.
+ *
+ * NetBSD 3.0 had a 32-bit value for vnu_ino.
+ *
+ * NetBSD 5.0 had a 32-bit value for vnu_dev, and vnd_size.
+ */
+struct vnd_user30 {
+ int vnu_unit; /* which vnd unit */
+ uint32_t vnu_dev; /* file is on this device... */
+ uint32_t vnu_ino; /* ...at this inode */
+};
+#define VNDIOCGET30 _IOWR('F', 2, struct vnd_user30) /* get list */
+
+struct vnd_user50 {
+ int vnu_unit; /* which vnd unit */
+ uint32_t vnu_dev; /* file is on this device... */
+ ino_t vnu_ino; /* ...at this inode */
+};
+#define VNDIOCGET50 _IOWR('F', 3, struct vnd_user50) /* get list */
+
+struct vnd_ioctl50 {
+ char *vnd_file; /* pathname of file to mount */
+ int vnd_flags; /* flags; see below */
+ struct vndgeom vnd_geom; /* geometry to emulate */
+ unsigned int vnd_size; /* (returned) size of disk */
+};
+#define VNDIOCSET50 _IOWR('F', 0, struct vnd_ioctl50)
+#define VNDIOCCLR50 _IOW('F', 1, struct vnd_ioctl50)
+
+#endif /* _KERNEL */
+
#endif /* _SYS_DEV_VNDVAR_H_ */
Home |
Main Index |
Thread Index |
Old Index