1/* Some prototypes for extern functions. */ 2 3//#undef __KERNEL_STRICT_NAMES 4#include <linux/types.h> 5 6#if !defined(__GNUC__) && !defined(__attribute__) 7#define __attribute__(x) 8#endif 9 10#define lba28_limit ((__u64)(1<<28) - 1) 11 12void identify (__u16 *id_supplied); 13void usage_error(int out) __attribute__((noreturn)); 14void no_scsi (void); 15void no_xt (void); 16void process_dev (char *devname); 17int sysfs_get_attr (int fd, const char *attr, const char *fmt, void *val1, void *val2, int verbose); 18int sysfs_set_attr (int fd, const char *attr, const char *fmt, void *val_p, int verbose); 19int get_dev_geometry (int fd, __u32 *cyls, __u32 *heads, __u32 *sects, __u64 *start_lba, __u64 *nsectors); 20int get_dev_t_geometry (dev_t dev, __u32 *cyls, __u32 *heads, __u32 *sects, __u64 *start_lba, __u64 *nsectors); 21int do_filemap(const char *file_name); 22int do_fallocate_syscall (const char *name, __u64 bytecount); 23int fwdownload(int fd, __u16 *id, const char *fwpath, int xfer_mode); 24void dco_identify_print (__u16 *dco); 25int set_dvdspeed(int fd, int speed); 26int fd_is_raid (int fd); 27 28int wdidle3_set_timeout (int fd, unsigned char timeout); 29int wdidle3_get_timeout (int fd, unsigned char *timeout); 30void wdidle3_print_timeout (unsigned char timeout); 31unsigned char wdidle3_msecs_to_timeout (unsigned int msecs); 32 33extern const char *BuffType[4]; 34 35struct local_hd_big_geometry { 36 unsigned char heads; 37 unsigned char sectors; 38 unsigned int cylinders; 39 unsigned long start; 40}; 41 42struct local_hd_geometry { 43 unsigned char heads; 44 unsigned char sectors; 45 unsigned short cylinders; 46 unsigned long start; /* mmm.. on 32-bit, this limits us to LBA32, 2TB max offset */ 47}; 48 49enum { /* ioctl() numbers */ 50 HDIO_DRIVE_CMD = 0x031f, 51 HDIO_DRIVE_RESET = 0x031c, 52 HDIO_DRIVE_TASK = 0x031e, 53 HDIO_DRIVE_TASKFILE = 0x031d, 54 HDIO_GETGEO = 0x0301, 55 HDIO_GETGEO_BIG = 0x0330, 56 HDIO_GET_32BIT = 0x0309, 57 HDIO_GET_ACOUSTIC = 0x030f, 58 HDIO_GET_BUSSTATE = 0x031a, 59 HDIO_GET_DMA = 0x030b, 60 HDIO_GET_IDENTITY = 0x030d, 61 HDIO_GET_KEEPSETTINGS = 0x0308, 62 HDIO_GET_MULTCOUNT = 0x0304, 63 HDIO_GET_NOWERR = 0x030a, 64 HDIO_GET_QDMA = 0x0305, 65 HDIO_GET_UNMASKINTR = 0x0302, 66 HDIO_OBSOLETE_IDENTITY = 0x0307, 67 HDIO_SCAN_HWIF = 0x0328, 68 HDIO_SET_32BIT = 0x0324, 69 HDIO_SET_ACOUSTIC = 0x032c, 70 HDIO_SET_BUSSTATE = 0x032d, 71 HDIO_SET_DMA = 0x0326, 72 HDIO_SET_KEEPSETTINGS = 0x0323, 73 HDIO_SET_MULTCOUNT = 0x0321, 74 HDIO_SET_NOWERR = 0x0325, 75 HDIO_SET_PIO_MODE = 0x0327, 76 HDIO_SET_QDMA = 0x032e, 77 HDIO_SET_UNMASKINTR = 0x0322, 78 HDIO_SET_WCACHE = 0x032b, 79 HDIO_TRISTATE_HWIF = 0x031b, 80 HDIO_UNREGISTER_HWIF = 0x032a, 81 CDROM__SPEED = 0x5322, 82}; 83 84#define START_LBA_UNKNOWN (~0ull) 85 86/* Some systems define BLKGETSIZE64 with a "u64" arg, 87 * but without supplying a typedef for u64. 88 * The only real workaround here is to define it locally, 89 * instead of using the system def from <linux/fs.h> 90 */ 91#ifdef BLKGETSIZE64 92#undef BLKGETSIZE64 93#endif 94#define BLKGETSIZE64 _IOR(0x12,114,__u64) 95 96