Module Name: src Committed By: mrg Date: Sun Sep 19 09:41:37 UTC 2010
Modified Files: src/sys/dev: vnd.c vndvar.h Log Message: actually, put the old definitions back into vndvar.h, under _KERNEL, as netbsd32 wants access to them. To generate a diff of this commit: cvs rdiff -u -r1.212 -r1.213 src/sys/dev/vnd.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/vndvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/vnd.c diff -u src/sys/dev/vnd.c:1.212 src/sys/dev/vnd.c:1.213 --- src/sys/dev/vnd.c:1.212 Sun Sep 19 07:11:42 2010 +++ src/sys/dev/vnd.c Sun Sep 19 09:41:37 2010 @@ -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: Index: src/sys/dev/vndvar.h diff -u src/sys/dev/vndvar.h:1.28 src/sys/dev/vndvar.h:1.29 --- src/sys/dev/vndvar.h:1.28 Sun Sep 19 07:11:42 2010 +++ src/sys/dev/vndvar.h Sun Sep 19 09:41:37 2010 @@ -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_ */