]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/linux/zftape.h
5 * Copyright (C) 1996, 1997 Claus-Justus Heine.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING. If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 * $Source: /homes/cvs/ftape-stacked/include/linux/zftape.h,v $
24 * $Date: 1997/10/21 11:02:37 $
26 * Special ioctl and other global info for the zftape VFS
27 * interface for the QIC-40/80/3010/3020 floppy-tape driver for
31 #define ZFTAPE_VERSION "zftape for " FTAPE_VERSION
33 #include <linux/ftape.h>
35 #define ZFTAPE_LABEL "Ftape - The Linux Floppy Tape Project!"
37 /* Bits of the minor device number that control the operation mode */
38 #define ZFT_Q80_MODE (1 << 3)
39 #define ZFT_ZIP_MODE (1 << 4)
40 #define ZFT_RAW_MODE (1 << 5)
41 #define ZFT_MINOR_OP_MASK (ZFT_Q80_MODE | \
44 #define ZFT_MINOR_MASK (FTAPE_SEL_MASK | \
50 unsigned int mt_blksz
;
52 #define MTIOC_ZFTAPE_GETBLKSZ _IOR('m', 104, struct mtblksz)
57 extern int zft_init(void);
59 static inline __s64
zft_div_blksz(__s64 value
, __u32 blk_sz
)
64 return (__s64
)(((__u32
)(value
>> 10) + (blk_sz
>> 10) - 1)
69 static inline __s64
zft_mul_blksz(__s64 value
, __u32 blk_sz
)
74 /* if blk_sz != 1, then it is a multiple of 1024. In
75 * this case, `value' will also fit into 32 bits.
77 * Actually, this limits the capacity to 42
78 * bits. This is (2^32)*1024, roughly a thousand
79 * times 2GB, or 3 Terabytes. Hopefully this is enough
81 return(__s64
)(((__u32
)(value
)*(blk_sz
>>10))<<10);