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