Line
Link Here
|
|
This patch is still needed with Linux 2.6. |
|
This patch is still needed with Linux 2.6. |
1 |
-- /dev/null |
1 |
++ b/src/ext2-stuff.h |
Line 0
Link Here
|
0 |
-- a/src/fdmount.c |
1 |
/* ext2-stuff.h |
|
|
2 |
* |
3 |
* with linux-kernel-headers 2.5.999-test7-bk-9 installed, the fdutils |
4 |
* compilation fails, because of problems with the included |
5 |
* <linux/ext2_fs.h>. |
6 |
* |
7 |
* This file contains a copy of all the necessary declarations. These |
8 |
* are ripped of "ext2_fs.h" from the kernel-headers-2.4.22-1 package. |
9 |
* |
10 |
* This file is Copyright 2003 Jochen Voss <voss@debian.org>. |
11 |
* You may redistribute it under the terms of the GPL version 2. |
12 |
* |
13 |
* Updated 2010 by Matteo Cypriani, with contents of "ext2_fs.h" from |
14 |
* Debian package linux-libc-dev 2.6.32-12. |
15 |
*/ |
16 |
|
17 |
#ifndef EXT2_STUFF_SEEN |
18 |
#define EXT2_STUFF_SEEN |
19 |
|
20 |
#define EXT2_SUPER_MAGIC 0xEF53 |
21 |
#define EXT3_SUPER_MAGIC 0xEF53 |
22 |
|
23 |
struct ext2_super_block { |
24 |
__le32 s_inodes_count; /* Inodes count */ |
25 |
__le32 s_blocks_count; /* Blocks count */ |
26 |
__le32 s_r_blocks_count; /* Reserved blocks count */ |
27 |
__le32 s_free_blocks_count; /* Free blocks count */ |
28 |
__le32 s_free_inodes_count; /* Free inodes count */ |
29 |
__le32 s_first_data_block; /* First Data Block */ |
30 |
__le32 s_log_block_size; /* Block size */ |
31 |
__le32 s_log_frag_size; /* Fragment size */ |
32 |
__le32 s_blocks_per_group; /* # Blocks per group */ |
33 |
__le32 s_frags_per_group; /* # Fragments per group */ |
34 |
__le32 s_inodes_per_group; /* # Inodes per group */ |
35 |
__le32 s_mtime; /* Mount time */ |
36 |
__le32 s_wtime; /* Write time */ |
37 |
__le16 s_mnt_count; /* Mount count */ |
38 |
__le16 s_max_mnt_count; /* Maximal mount count */ |
39 |
__le16 s_magic; /* Magic signature */ |
40 |
__le16 s_state; /* File system state */ |
41 |
__le16 s_errors; /* Behaviour when detecting errors */ |
42 |
__le16 s_minor_rev_level; /* minor revision level */ |
43 |
__le32 s_lastcheck; /* time of last check */ |
44 |
__le32 s_checkinterval; /* max. time between checks */ |
45 |
__le32 s_creator_os; /* OS */ |
46 |
__le32 s_rev_level; /* Revision level */ |
47 |
__le16 s_def_resuid; /* Default uid for reserved blocks */ |
48 |
__le16 s_def_resgid; /* Default gid for reserved blocks */ |
49 |
/* |
50 |
* These fields are for EXT2_DYNAMIC_REV superblocks only. |
51 |
* |
52 |
* Note: the difference between the compatible feature set and |
53 |
* the incompatible feature set is that if there is a bit set |
54 |
* in the incompatible feature set that the kernel doesn't |
55 |
* know about, it should refuse to mount the filesystem. |
56 |
* |
57 |
* e2fsck's requirements are more strict; if it doesn't know |
58 |
* about a feature in either the compatible or incompatible |
59 |
* feature set, it must abort and not try to meddle with |
60 |
* things it doesn't understand... |
61 |
*/ |
62 |
__le32 s_first_ino; /* First non-reserved inode */ |
63 |
__le16 s_inode_size; /* size of inode structure */ |
64 |
__le16 s_block_group_nr; /* block group # of this superblock */ |
65 |
__le32 s_feature_compat; /* compatible feature set */ |
66 |
__le32 s_feature_incompat; /* incompatible feature set */ |
67 |
__le32 s_feature_ro_compat; /* readonly-compatible feature set */ |
68 |
__u8 s_uuid[16]; /* 128-bit uuid for volume */ |
69 |
char s_volume_name[16]; /* volume name */ |
70 |
char s_last_mounted[64]; /* directory where last mounted */ |
71 |
__le32 s_algorithm_usage_bitmap; /* For compression */ |
72 |
/* |
73 |
* Performance hints. Directory preallocation should only |
74 |
* happen if the EXT2_COMPAT_PREALLOC flag is on. |
75 |
*/ |
76 |
__u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/ |
77 |
__u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */ |
78 |
__u16 s_padding1; |
79 |
/* |
80 |
* Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set. |
81 |
*/ |
82 |
__u8 s_journal_uuid[16]; /* uuid of journal superblock */ |
83 |
__u32 s_journal_inum; /* inode number of journal file */ |
84 |
__u32 s_journal_dev; /* device number of journal file */ |
85 |
__u32 s_last_orphan; /* start of list of inodes to delete */ |
86 |
__u32 s_hash_seed[4]; /* HTREE hash seed */ |
87 |
__u8 s_def_hash_version; /* Default hash version to use */ |
88 |
__u8 s_reserved_char_pad; |
89 |
__u16 s_reserved_word_pad; |
90 |
__le32 s_default_mount_opts; |
91 |
__le32 s_first_meta_bg; /* First metablock block group */ |
92 |
__u32 s_reserved[190]; /* Padding to the end of the block */ |
93 |
}; |
94 |
|
95 |
#endif /* EXT2_STUFF_SEEN */ |
|
|
96 |
++ b/src/fdmount.c |
Lines 22-28
Link Here
|
22 |
#include <linux/ext_fs.h> |
22 |
#include <linux/ext_fs.h> |
23 |
#endif |
23 |
#endif |
24 |
|
24 |
|
25 |
#include <linux/ext2_fs.h> |
25 |
/* JV: the following breaks with linux-kernel-headers 2.5.999-test7-bk-9 */ |
|
|
26 |
/* #include <linux/ext2_fs.h> */ |
27 |
#include "ext2-stuff.h" |
26 |
|
28 |
|
27 |
#ifdef HAVE_LINUX_XIA_FS_H |
29 |
#ifdef HAVE_LINUX_XIA_FS_H |
28 |
#include <linux/xia_fs.h> |
30 |
#include <linux/xia_fs.h> |