freebsd32_ioctl.h revision 183270
199577Sjulian/*-
299577Sjulian * Copyright (c) 2008 David E. O'Brien
399577Sjulian * All rights reserved.
499577Sjulian *
599577Sjulian * Redistribution and use in source and binary forms, with or without
699577Sjulian * modification, are permitted provided that the following conditions
799577Sjulian * are met:
899577Sjulian * 1. Redistributions of source code must retain the above copyright
999577Sjulian *    notice, this list of conditions and the following disclaimer.
1099577Sjulian * 2. Redistributions in binary form must reproduce the above copyright
1199577Sjulian *    notice, this list of conditions and the following disclaimer in the
1299577Sjulian *    documentation and/or other materials provided with the distribution.
1399577Sjulian * 3. Neither the name of the author nor the names of its contributors
1499577Sjulian *    may be used to endorse or promote products derived from this software
1599577Sjulian *    without specific prior written permission.
1699577Sjulian *
1799577Sjulian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1899577Sjulian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1999577Sjulian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2099577Sjulian * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2199577Sjulian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2299577Sjulian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2399577Sjulian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2499577Sjulian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2599577Sjulian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2699577Sjulian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2799577Sjulian * SUCH DAMAGE.
2899577Sjulian *
2999577Sjulian * $FreeBSD: head/sys/compat/freebsd32/freebsd32_ioctl.h 183270 2008-09-22 16:09:16Z obrien $
3099577Sjulian */
3199577Sjulian
3299577Sjulian#ifndef _COMPAT_FREEBSD32_IOCTL_H_
33107708Sru#define	_COMPAT_FREEBSD32_IOCTL_H_
34107708Sru
3599577Sjuliantypedef __uint32_t caddr_t32;
3699577Sjulian#define	MDNPAD32	MDNPAD - 1
3799577Sjulianstruct md_ioctl32 {
3899577Sjulian	unsigned	md_version;	/* Structure layout version */
3999577Sjulian	unsigned	md_unit;	/* unit number */
4099577Sjulian	enum md_types	md_type;	/* type of disk */
4199577Sjulian	caddr_t32	md_file;	/* pathname of file to mount */
4299577Sjulian	off_t		md_mediasize;	/* size of disk in bytes */
43107708Sru	unsigned	md_sectorsize;	/* sectorsize */
4499577Sjulian	unsigned	md_options;	/* options */
45107708Sru	u_int64_t	md_base;	/* base address */
4699577Sjulian	int		md_fwheads;	/* firmware heads */
4799577Sjulian	int		md_fwsectors;	/* firmware sectors */
4899577Sjulian	int		md_pad[MDNPAD32]; /* padding for future ideas */
4999577Sjulian};
5099577Sjulian
5199577Sjulian#define	MDIOCATTACH_32	_IOC(IOC_INOUT, 'm', 0, sizeof(struct md_ioctl32) + 4)
5299577Sjulian#define	MDIOCDETACH_32	_IOC(IOC_INOUT, 'm', 1, sizeof(struct md_ioctl32) + 4)
5399577Sjulian#define	MDIOCQUERY_32	_IOC(IOC_INOUT, 'm', 2, sizeof(struct md_ioctl32) + 4)
5499577Sjulian#define	MDIOCLIST_32	_IOC(IOC_INOUT, 'm', 3, sizeof(struct md_ioctl32) + 4)
5599577Sjulian
5699577Sjulian#endif	/* _COMPAT_FREEBSD32_IOCTL_H_ */
5799577Sjulian