]> git.pld-linux.org Git - packages/xfsprogs.git/blame - xfsprogs-diet.patch
- drop initrd stuff
[packages/xfsprogs.git] / xfsprogs-diet.patch
CommitLineData
938f7d39
JR
1--- xfsprogs-3.0.0/include/linux.h~ 2009-02-04 23:29:25.000000000 +0100
2+++ xfsprogs-3.0.0/include/linux.h 2009-03-19 16:19:35.000000000 +0100
56a127f1 3@@ -25,6 +25,10 @@
938f7d39
JR
4 #include <malloc.h>
5 #include <getopt.h>
6 #include <endian.h>
7+#ifdef __dietlibc__
56a127f1 8+#include <libgen.h>
938f7d39
JR
9+#include <xfs/xfs_types.h>
10+#endif
11
12 static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
13 {
14diff -ur xfsprogs-3.0.0/include/project.h xfsprogs-3.0.0-diet/include/project.h
15--- xfsprogs-3.0.0/include/project.h 2009-02-04 23:29:25.000000000 +0100
16+++ xfsprogs-3.0.0-diet/include/project.h 2009-03-19 12:55:05.000000000 +0100
17@@ -19,6 +19,9 @@
18 #define __PROJECT_H__
19
20 #include <xfs/xfs.h>
21+#ifdef __dietlibc__
22+#include <xfs/xfs_types.h>
23+#endif
24
25 #if !defined(__sgi__)
26 typedef __uint32_t prid_t;
27diff -ur xfsprogs-3.0.0/include/xfs_ialloc_btree.h xfsprogs-3.0.0-diet/include/xfs_ialloc_btree.h
28--- xfsprogs-3.0.0/include/xfs_ialloc_btree.h 2009-02-04 23:29:25.000000000 +0100
29+++ xfsprogs-3.0.0-diet/include/xfs_ialloc_btree.h 2009-03-19 12:49:55.000000000 +0100
30@@ -18,6 +18,9 @@
31 #ifndef __XFS_IALLOC_BTREE_H__
32 #define __XFS_IALLOC_BTREE_H__
33
34+#ifdef __dietlibc__
35+#define NBBY CHAR_BIT
36+#endif
37 /*
38 * Inode map on-disk structures
39 */
40diff -ur xfsprogs-3.0.0/include/xfs_types.h xfsprogs-3.0.0-diet/include/xfs_types.h
41--- xfsprogs-3.0.0/include/xfs_types.h 2009-02-04 23:29:25.000000000 +0100
42+++ xfsprogs-3.0.0-diet/include/xfs_types.h 2009-03-19 12:40:08.000000000 +0100
43@@ -28,18 +28,6 @@
44 typedef unsigned int uint_t;
45 typedef unsigned long ulong_t;
46
47-/*
48- * Additional type declarations for XFS
49- */
50-typedef signed char __int8_t;
51-typedef unsigned char __uint8_t;
52-typedef signed short int __int16_t;
53-typedef unsigned short int __uint16_t;
54-typedef signed int __int32_t;
55-typedef unsigned int __uint32_t;
56-typedef signed long long int __int64_t;
57-typedef unsigned long long int __uint64_t;
58-
59 typedef enum { B_FALSE,B_TRUE } boolean_t;
60 typedef __uint32_t prid_t; /* project ID */
61 typedef __uint32_t inst_t; /* an instruction */
62@@ -64,6 +52,20 @@
63
64 #endif /* __KERNEL__ */
65
66+#if defined(__dietlibc__) || defined(__KERNEL__)
67+/*
68+ * Additional type declarations for XFS
69+ */
70+typedef signed char __int8_t;
71+typedef unsigned char __uint8_t;
72+typedef signed short int __int16_t;
73+typedef unsigned short int __uint16_t;
74+typedef signed int __int32_t;
75+typedef unsigned int __uint32_t;
76+typedef signed long long int __int64_t;
77+typedef unsigned long long int __uint64_t;
78+#endif
79+
80 typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */
81 typedef __uint32_t xfs_extlen_t; /* extent length in blocks */
82 typedef __uint32_t xfs_agnumber_t; /* allocation group number */
56a127f1
JR
83--- xfsprogs-3.0.0/libdisk/evms.h~ 2009-02-04 23:29:25.000000000 +0100
84+++ xfsprogs-3.0.0/libdisk/evms.h 2009-03-19 21:52:18.000000000 +0100
85@@ -15,6 +15,9 @@
86 * along with this program; if not, write to the Free Software
87 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
88 */
89+#ifdef __dietlibc__
90+#include <xfs/platform_defs.h>
91+#endif
92
93 #define EVMS_MAJOR 117
94 #define EVMS_GET_VOL_STRIPE_INFO \
938f7d39
JR
95diff -ur xfsprogs-3.0.0/libdisk/xvm.h xfsprogs-3.0.0-diet/libdisk/xvm.h
96--- xfsprogs-3.0.0/libdisk/xvm.h 2009-02-04 23:29:25.000000000 +0100
97+++ xfsprogs-3.0.0-diet/libdisk/xvm.h 2009-03-19 12:56:54.000000000 +0100
56a127f1 98@@ -15,6 +15,10 @@
938f7d39
JR
99 * along with this program; if not, write the Free Software Foundation,
100 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
101 */
102+#ifdef __dietlibc__
56a127f1 103+#include <xfs/platform_defs.h>
938f7d39
JR
104+#include <xfs/xfs_types.h>
105+#endif
106
107 #define _DIOC_(x) (('d'<<8) | x)
108 #define DIOCGETVOLDEV _DIOC_(36) /* subvolume devices */
109diff -ur xfsprogs-3.0.0/libhandle/handle.c xfsprogs-3.0.0-diet/libhandle/handle.c
110--- xfsprogs-3.0.0/libhandle/handle.c 2009-02-04 23:29:25.000000000 +0100
111+++ xfsprogs-3.0.0-diet/libhandle/handle.c 2009-03-19 12:56:03.000000000 +0100
112@@ -17,6 +17,10 @@
113 #include <xfs/xfs.h>
114 #include <xfs/handle.h>
115 #include <xfs/parent.h>
116+#ifdef __dietlibc__
117+#include <xfs/xfs_types.h>
118+#include <linux/limits.h>
119+#endif
120
121 /* just pick a value we know is more than big enough */
122 #define MAXHANSIZ 64
123diff -ur xfsprogs-3.0.0/libhandle/jdm.c xfsprogs-3.0.0-diet/libhandle/jdm.c
124--- xfsprogs-3.0.0/libhandle/jdm.c 2009-02-04 23:29:25.000000000 +0100
125+++ xfsprogs-3.0.0-diet/libhandle/jdm.c 2009-03-19 12:56:28.000000000 +0100
126@@ -17,6 +17,10 @@
127 #include <xfs/handle.h>
128 #include <xfs/jdm.h>
129 #include <xfs/parent.h>
130+#ifdef __dietlibc__
131+#include <xfs/xfs_types.h>
132+#include <linux/limits.h>
133+#endif
134
135 /* internal fshandle - typecast to a void for external use */
136 #define FSHANDLE_SZ 8
137diff -ur xfsprogs-3.0.0/libxfs/linux.c xfsprogs-3.0.0-diet/libxfs/linux.c
138--- xfsprogs-3.0.0/libxfs/linux.c 2009-02-04 23:29:25.000000000 +0100
139+++ xfsprogs-3.0.0-diet/libxfs/linux.c 2009-03-19 13:30:12.000000000 +0100
56a127f1 140@@ -21,7 +21,12 @@
938f7d39
JR
141 #include <mntent.h>
142 #include <sys/stat.h>
143 #undef ustat
56a127f1
JR
144+#ifdef __dietlibc__
145+#include <ustat.h>
146+#include <sys/types.h>
147+#else
938f7d39
JR
148 #include <sys/ustat.h>
149+#endif
150 #include <sys/mount.h>
151 #include <sys/ioctl.h>
152 #include <sys/sysinfo.h>
938f7d39
JR
153diff -ur xfsprogs-3.0.0/repair/prefetch.c xfsprogs-3.0.0-diet/repair/prefetch.c
154--- xfsprogs-3.0.0/repair/prefetch.c 2009-02-04 23:29:26.000000000 +0100
155+++ xfsprogs-3.0.0-diet/repair/prefetch.c 2009-03-19 16:00:01.000000000 +0100
156@@ -735,7 +735,11 @@
157 {
158 mp = pmp;
159 mp_fd = libxfs_device_to_fd(mp->m_dev);
160+#ifdef __dietlibc__
161+ pf_max_bytes = sysconf(_SC_PAGESIZE) << 7;
162+#else
163 pf_max_bytes = sysconf(_SC_PAGE_SIZE) << 7;
164+#endif
165 pf_max_bbs = pf_max_bytes >> BBSHIFT;
166 pf_max_fsbs = pf_max_bytes >> mp->m_sb.sb_blocklog;
167 pf_batch_bytes = DEF_BATCH_BYTES;
56a127f1
JR
168--- xfsprogs-3.0.0/include/platform_defs.h.in~ 2009-02-04 23:29:25.000000000 +0100
169+++ xfsprogs-3.0.0/include/platform_defs.h.in 2009-03-19 21:48:13.000000000 +0100
170@@ -169,4 +169,14 @@
171 #define __arch_pack
172 #endif
173
174+#if defined(__dietlibc__) && defined(__NO_STAT64)
175+#define lstat64 lstat
176+#define fstat64 fstat
177+#define stat64 stat
178+#define pread64 pread
179+#define pwrite64 pwrite
180+#define lseek64 lseek
181+#define ftruncate64 ftruncate
182+#endif
183+
184 #endif /* __XFS_PLATFORM_DEFS_H__ */
This page took 0.058232 seconds and 4 git commands to generate.