]> git.pld-linux.org Git - packages/util-linux.git/blame - util-linux-blk.patch
- TODO added
[packages/util-linux.git] / util-linux-blk.patch
CommitLineData
85728dd4
JB
1--- util-linux-2.12/disk-utils/elvtune.c.orig 2002-03-08 23:57:49.000000000 +0100
2+++ util-linux-2.12/disk-utils/elvtune.c 2004-02-23 23:07:41.428306200 +0100
be265cc8
MM
3@@ -27,6 +27,7 @@
4 #include <unistd.h>
5 #include <stdlib.h>
6 #include "nls.h"
7+#include <linux/version.h>
8
9 /* this has to match with the kernel structure */
10 /* current version for ac19 and 2.2.16 */
11@@ -37,8 +38,13 @@
440614a9
JB
12 int max_bomb_segments;
13 } blkelv_ioctl_arg_t;
14
85728dd4
JB
15-#define BLKELVGET _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t))
16-#define BLKELVSET _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t))
be265cc8
MM
17+#ifdef LIBC_HEADERS_VERSION
18+/* Fixed headers detected */
19+#include <linux/fs.h>
20+#else
85728dd4
JB
21+#define BLKELVGET _IOR(0x12,106,size_t) /* blkelv_ioctl_arg_t broken by sizeof */
22+#define BLKELVSET _IOW(0x12,107,size_t) /* blkelv_ioctl_arg_t broken by sizeof */
be265cc8 23+#endif
440614a9
JB
24
25 static void
26 usage(void) {
85728dd4
JB
27--- util-linux-2.12/disk-utils/blockdev.c.orig 2002-03-08 23:57:02.000000000 +0100
28+++ util-linux-2.12/disk-utils/blockdev.c 2004-02-23 23:08:09.053106592 +0100
be265cc8
MM
29@@ -9,12 +9,14 @@
30 #include <string.h>
31 #include <unistd.h>
32 #include <sys/ioctl.h>
33+#include <linux/version.h>
34
35 #include "nls.h"
36
37-/* Since it is impossible to include <linux/fs.h>, let us
38- give the ioctls explicitly. */
39-
40+#ifdef LIBC_HEADERS_VERSION
41+/* Fixed headers detected */
42+#include <linux/fs.h>
43+#else
44 #ifndef BLKROSET
45 #define BLKROSET _IO(0x12,93)
46 #define BLKROGET _IO(0x12,94)
85728dd4
JB
47@@ -24,8 +26,9 @@
48 #define BLKRASET _IO(0x12,98)
49 #define BLKRAGET _IO(0x12,99)
50 #define BLKSSZGET _IO(0x12,104)
51-#define BLKBSZGET _IOR(0x12,112,sizeof(int))
52-#define BLKBSZSET _IOW(0x12,113,sizeof(int))
53+#define BLKBSZGET _IOR(0x12,112,size_t) /* int broken by sizeof */
54+#define BLKBSZSET _IOW(0x12,113,size_t) /* int broken by sizeof */
be265cc8 55+#endif
85728dd4 56 #endif
440614a9
JB
57
58 /* Maybe <linux/hdreg.h> could be included */
85728dd4
JB
59--- util-linux-2.12/fdisk/common.h.orig 2003-07-13 15:59:53.000000000 +0200
60+++ util-linux-2.12/fdisk/common.h 2004-02-23 23:09:39.330382360 +0100
be265cc8
MM
61@@ -1,12 +1,18 @@
62 /* common stuff for fdisk, cfdisk, sfdisk */
63
64-/* including <linux/fs.h> fails */
65 #include <sys/ioctl.h>
66+#include <linux/version.h>
67+
68+#ifdef LIBC_HEADERS_VERSION
69+/* Fixed headers detected */
70+#include <linux/fs.h>
71+#else
72 #define BLKRRPART _IO(0x12,95) /* re-read partition table */
440614a9
JB
73 #define BLKGETSIZE _IO(0x12,96) /* return device size */
74 #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
75 #define BLKSSZGET _IO(0x12,104) /* get block device sector size */
85728dd4
JB
76-#define BLKGETSIZE64 _IOR(0x12,114,8) /* 8 = sizeof(u64) */
77+#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* u64 broken by sizeof; NOT 8(==int)!!! */
be265cc8 78+#endif
440614a9
JB
79
80 /* including <linux/hdreg.h> also fails */
81 struct hd_geometry {
This page took 0.161832 seconds and 4 git commands to generate.