]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Avoid using uint and uchar types when probing for ocfs2 filesystems
authorTheodore Ts'o <tytso@mit.edu>
Wed, 1 Dec 2004 00:05:38 +0000 (19:05 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 1 Dec 2004 00:05:38 +0000 (19:05 -0500)
in the blkid library, to allow compilation using dietlibc.

lib/blkid/ChangeLog
lib/blkid/probe.c
lib/blkid/probe.h

index ded2abb9c43f8e2a9fda6d58366312d049a23429..7812ab0313dfa7836b579ecab0e64c740c745ae5 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-30  Theodore Ts'o  <tytso@mit.edu>
 
+       * probe.c, probe.h: Avoid using uint and uchar types, to allow
+               compilation using dietlibc.
+
        * Makefile.in: Use Linux-kernel-style makefile output to make it
                easier to see errors/warnings.
 
index de0d75dde603837bfff29e7a1a15d32b80e7ccb1..48edb9560ace44ceb6ea3371901f02e49ad003ae 100644 (file)
@@ -320,7 +320,7 @@ static int probe_ocfs(int fd __BLKID_ATTR((unused)),
 {
        struct ocfs_volume_header ovh;
        struct ocfs_volume_label ovl;
-       uint major;
+       __u32 major;
 
        memcpy(&ovh, buf, sizeof(ovh));
        memcpy(&ovl, buf+512, sizeof(ovl));
index d8b6959dc4f94eb47daf57d27468292a66b90055..006760006de305c34086f82af929ffc63352bcf9 100644 (file)
@@ -210,36 +210,36 @@ struct hfs_super_block {
 };
 
 struct ocfs_volume_header {
-       u_char  minor_version[4];
-       u_char  major_version[4];
-       u_char  signature[128];
-       u_char  mount[128];
-       u_char  mount_len[2];
+       unsigned char   minor_version[4];
+       unsigned char   major_version[4];
+       unsigned char   signature[128];
+       unsigned char  mount[128];
+       unsigned char  mount_len[2];
 };
 
 struct ocfs_volume_label {
-       u_char  disk_lock[48];
-       u_char  label[64];      
-       u_char  label_len[2];
-       u_char  vol_id[16];
-       u_char  vol_id_len[2];
+       unsigned char   disk_lock[48];
+       unsigned char   label[64];      
+       unsigned char   label_len[2];
+       unsigned char  vol_id[16];
+       unsigned char  vol_id_len[2];
 };
 
-#define ocfsmajor(o) ((uint)o.major_version[0] \
-                   + (((uint) o.major_version[1]) << 8) \
-                   + (((uint) o.major_version[2]) << 16) \
-                   + (((uint) o.major_version[3]) << 24))
-#define ocfslabellen(o)        ((uint)o.label_len[0] + (((uint) o.label_len[1]) << 8))
-#define ocfsmountlen(o)        ((uint)o.mount_len[0] + (((uint) o.mount_len[1])<<8))
+#define ocfsmajor(o) ((__u32)o.major_version[0] \
+                   + (((__u32) o.major_version[1]) << 8) \
+                   + (((__u32) o.major_version[2]) << 16) \
+                   + (((__u32) o.major_version[3]) << 24))
+#define ocfslabellen(o)        ((__u32)o.label_len[0] + (((__u32) o.label_len[1]) << 8))
+#define ocfsmountlen(o)        ((__u32)o.mount_len[0] + (((__u32) o.mount_len[1])<<8))
 
 #define OCFS_MAGIC "OracleCFS"
 
 struct ocfs2_super_block {
-       u_char  signature[8];
-       u_char  s_dummy1[184];
-       u_char  s_dummy2[80];
-       u_char  s_label[64];
-       u_char  s_uuid[16];
+       unsigned char  signature[8];
+       unsigned char  s_dummy1[184];
+       unsigned char  s_dummy2[80];
+       unsigned char  s_label[64];
+       unsigned char  s_uuid[16];
 };
 
 #define OCFS2_MIN_BLOCKSIZE             512