X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..f427ee49d309d8fc33ebf3042c3a775f2f530ded:/bsd/sys/vnioctl.h?ds=inline diff --git a/bsd/sys/vnioctl.h b/bsd/sys/vnioctl.h index 43f0c86f9..88e33ce75 100644 --- a/bsd/sys/vnioctl.h +++ b/bsd/sys/vnioctl.h @@ -1,8 +1,8 @@ /* - * Copyright (c) 2004-2005 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2004-2006 Apple Computer, Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in @@ -11,10 +11,10 @@ * unlawful or unlicensed copies of an Apple operating system, or to * circumvent, violate, or enable the circumvention or violation of, any * terms of an Apple operating system software license agreement. - * + * * Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -22,7 +22,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* @@ -80,33 +80,31 @@ * Ioctl definitions for file (vnode) disk pseudo-device. */ -#define _PATH_VNTAB "/etc/vntab" /* default config file */ +#define _PATH_VNTAB "/etc/vntab" /* default config file */ typedef enum { vncontrol_readwrite_io_e = 0 } vncontrol_t; struct vn_ioctl { - char * vn_file; /* pathname of file to mount */ - int vn_size; /* (returned) size of disk */ - vncontrol_t vn_control; + char * vn_file; /* pathname of file to mount */ + int vn_size; /* (returned) size of disk */ + vncontrol_t vn_control; }; #ifdef KERNEL_PRIVATE -#if __DARWIN_ALIGN_NATURAL -#pragma options align=natural -#endif - -struct user_vn_ioctl { - u_int64_t vn_file; /* pathname of file to mount */ - int vn_size; /* (returned) size of disk */ - vncontrol_t vn_control; +struct vn_ioctl_64 { + u_int64_t vn_file; /* pathname of file to mount */ + int vn_size; /* (returned) size of disk */ + vncontrol_t vn_control; }; -#if __DARWIN_ALIGN_NATURAL -#pragma options align=reset -#endif +struct vn_ioctl_32 { + u_int32_t vn_file; /* pathname of file to mount */ + int vn_size; /* (returned) size of disk */ + vncontrol_t vn_control; +}; #endif /* KERNEL_PRIVATE */ @@ -116,25 +114,30 @@ struct user_vn_ioctl { * an VNIOCCLR must be used to reset a configuration. An attempt to * VNIOCSET an already active unit will return EBUSY. */ -#define VNIOCATTACH _IOWR('F', 0, struct vn_ioctl) /* attach file */ -#define VNIOCDETACH _IOWR('F', 1, struct vn_ioctl) /* detach disk */ -#define VNIOCGSET _IOWR('F', 2, u_int32_t ) /* set global option */ -#define VNIOCGCLEAR _IOWR('F', 3, u_int32_t ) /* reset --//-- */ -#define VNIOCUSET _IOWR('F', 4, u_int32_t ) /* set unit option */ -#define VNIOCUCLEAR _IOWR('F', 5, u_int32_t ) /* reset --//-- */ -#define VNIOCSHADOW _IOWR('F', 6, struct vn_ioctl) /* attach shadow */ +#define VNIOCATTACH _IOWR('F', 0, struct vn_ioctl) /* attach file */ +#define VNIOCDETACH _IOWR('F', 1, struct vn_ioctl) /* detach disk */ +#define VNIOCGSET _IOWR('F', 2, u_int32_t ) /* set global option */ +#define VNIOCGCLEAR _IOWR('F', 3, u_int32_t ) /* reset --//-- */ +#define VNIOCUSET _IOWR('F', 4, u_int32_t ) /* set unit option */ +#define VNIOCUCLEAR _IOWR('F', 5, u_int32_t ) /* reset --//-- */ +#define VNIOCSHADOW _IOWR('F', 6, struct vn_ioctl) /* attach shadow */ #ifdef KERNEL_PRIVATE -#define VNIOCATTACH64 _IOWR('F', 0, struct user_vn_ioctl) /* attach file - LP64 */ -#define VNIOCDETACH64 _IOWR('F', 1, struct user_vn_ioctl) /* detach disk - LP64 */ -#define VNIOCSHADOW64 _IOWR('F', 6, struct user_vn_ioctl) /* attach shadow - LP64 */ +#define VNIOCATTACH64 _IOWR('F', 0, struct vn_ioctl_64) /* attach file - LP64 */ +#define VNIOCDETACH64 _IOWR('F', 1, struct vn_ioctl_64) /* detach disk - LP64 */ +#define VNIOCSHADOW64 _IOWR('F', 6, struct vn_ioctl_64) /* attach shadow - LP64 */ +#ifdef __LP64__ +#define VNIOCATTACH32 _IOWR('F', 0, struct vn_ioctl_32) /* attach file - U32 version for K64 */ +#define VNIOCDETACH32 _IOWR('F', 1, struct vn_ioctl_32) /* detach disk - U32 version for K64 */ +#define VNIOCSHADOW32 _IOWR('F', 6, struct vn_ioctl_32) /* attach shadow - U32 version for K64 */ +#endif #endif /* KERNEL_PRIVATE */ -#define VN_LABELS 0x1 /* Use disk(/slice) labels */ -#define VN_FOLLOW 0x2 /* Debug flow in vn driver */ -#define VN_DEBUG 0x4 /* Debug data in vn driver */ -#define VN_IO 0x8 /* Debug I/O in vn driver */ -#define VN_DONTCLUSTER 0x10 /* Don't cluster */ -#define VN_RESERVE 0x20 /* Pre-reserve swap */ +#define VN_LABELS 0x1 /* Use disk(/slice) labels */ +#define VN_FOLLOW 0x2 /* Debug flow in vn driver */ +#define VN_DEBUG 0x4 /* Debug data in vn driver */ +#define VN_IO 0x8 /* Debug I/O in vn driver */ +#define VN_DONTCLUSTER 0x10 /* Don't cluster */ +#define VN_RESERVE 0x20 /* Pre-reserve swap */ -#endif /* _SYS_VNIOCTL_H_*/ +#endif /* _SYS_VNIOCTL_H_*/