1*95e1ffb1Schristos /* $NetBSD: linux_mtio.h,v 1.2 2005/12/11 12:20:19 christos Exp $ */ 218d6a304Ssoren 318d6a304Ssoren /* 418d6a304Ssoren * Copyright (c) 2005 Soren S. Jorvang. All rights reserved. 518d6a304Ssoren * 618d6a304Ssoren * Redistribution and use in source and binary forms, with or without 718d6a304Ssoren * modification, are permitted provided that the following conditions 818d6a304Ssoren * are met: 918d6a304Ssoren * 1. Redistributions of source code must retain the above copyright 1018d6a304Ssoren * notice, this list of conditions, and the following disclaimer. 1118d6a304Ssoren * 2. Redistributions in binary form must reproduce the above copyright 1218d6a304Ssoren * notice, this list of conditions and the following disclaimer in the 1318d6a304Ssoren * documentation and/or other materials provided with the distribution. 1418d6a304Ssoren * 1518d6a304Ssoren * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1618d6a304Ssoren * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1718d6a304Ssoren * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1818d6a304Ssoren * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1918d6a304Ssoren * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2018d6a304Ssoren * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2118d6a304Ssoren * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2218d6a304Ssoren * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2318d6a304Ssoren * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2418d6a304Ssoren * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2518d6a304Ssoren * SUCH DAMAGE. 2618d6a304Ssoren */ 2718d6a304Ssoren 2818d6a304Ssoren #ifndef _LINUX_MTIO_H 2918d6a304Ssoren #define _LINUX_MTIO_H 3018d6a304Ssoren 3118d6a304Ssoren #define LINUX_MTIOCTOP _LINUX_IOW('m', 1, struct linux_mtop) 3218d6a304Ssoren #define LINUX_MTIOCGET _LINUX_IOR('m', 2, struct linux_mtget) 3318d6a304Ssoren #define LINUX_MTIOCPOS _LINUX_IOR('m', 3, struct linux_mtpos) 3418d6a304Ssoren 3518d6a304Ssoren struct linux_mtop { 3618d6a304Ssoren short mt_op; 3718d6a304Ssoren int mt_count; 3818d6a304Ssoren }; 3918d6a304Ssoren 4018d6a304Ssoren #define LINUX_MTRESET 0 4118d6a304Ssoren #define LINUX_MTFSF 1 4218d6a304Ssoren #define LINUX_MTBSF 2 4318d6a304Ssoren #define LINUX_MTFSR 3 4418d6a304Ssoren #define LINUX_MTBSR 4 4518d6a304Ssoren #define LINUX_MTWEOF 5 4618d6a304Ssoren #define LINUX_MTREW 6 4718d6a304Ssoren #define LINUX_MTOFFL 7 4818d6a304Ssoren #define LINUX_MTNOP 8 4918d6a304Ssoren #define LINUX_MTRETEN 9 5018d6a304Ssoren #define LINUX_MTBSFM 10 5118d6a304Ssoren #define LINUX_MTFSFM 11 5218d6a304Ssoren #define LINUX_MTEOM 12 5318d6a304Ssoren #define LINUX_MTERASE 13 5418d6a304Ssoren #define LINUX_MTRAS1 14 5518d6a304Ssoren #define LINUX_MTRAS2 15 5618d6a304Ssoren #define LINUX_MTRAS3 16 5718d6a304Ssoren #define LINUX_MTSETBLK 20 5818d6a304Ssoren #define LINUX_MTSETDENSITY 21 5918d6a304Ssoren #define LINUX_MTSEEK 22 6018d6a304Ssoren #define LINUX_MTTELL 23 6118d6a304Ssoren #define LINUX_MTSETDRVBUFFER 24 6218d6a304Ssoren #define LINUX_MTFSS 25 6318d6a304Ssoren #define LINUX_MTBSS 26 6418d6a304Ssoren #define LINUX_MTWSM 27 6518d6a304Ssoren #define LINUX_MTLOCK 28 6618d6a304Ssoren #define LINUX_MTUNLOCK 29 6718d6a304Ssoren #define LINUX_MTLOAD 30 6818d6a304Ssoren #define LINUX_MTUNLOAD 31 6918d6a304Ssoren #define LINUX_MTCOMPRESSION 32 7018d6a304Ssoren #define LINUX_MTSETPART 33 7118d6a304Ssoren #define LINUX_MTMKPART 34 7218d6a304Ssoren 7318d6a304Ssoren struct linux_mtget { 7418d6a304Ssoren #define LINUX_MT_ISUNKNOWN 0x01 7518d6a304Ssoren long mt_type; 7618d6a304Ssoren long mt_resid; 7718d6a304Ssoren long mt_dsreg; 7818d6a304Ssoren long mt_gstat; 7918d6a304Ssoren long mt_erreg; 8018d6a304Ssoren daddr_t mt_fileno; 8118d6a304Ssoren daddr_t mt_blkno; 8218d6a304Ssoren }; 8318d6a304Ssoren 8418d6a304Ssoren struct linux_mtpos { 8518d6a304Ssoren long mt_blkno; 8618d6a304Ssoren }; 8718d6a304Ssoren 8818d6a304Ssoren #endif /* !_LINUX_MTIO_H */ 89