From: Theodore Ts'o Date: Wed, 1 Dec 2004 00:05:38 +0000 (-0500) Subject: Avoid using uint and uchar types when probing for ocfs2 filesystems X-Git-Tag: E2FSPROGS-1_36~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3838f7df134035089e8e8df317112e4fd645602d;p=thirdparty%2Fe2fsprogs.git Avoid using uint and uchar types when probing for ocfs2 filesystems in the blkid library, to allow compilation using dietlibc. --- diff --git a/lib/blkid/ChangeLog b/lib/blkid/ChangeLog index ded2abb9c..7812ab031 100644 --- a/lib/blkid/ChangeLog +++ b/lib/blkid/ChangeLog @@ -1,5 +1,8 @@ 2004-11-30 Theodore Ts'o + * 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. diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c index de0d75dde..48edb9560 100644 --- a/lib/blkid/probe.c +++ b/lib/blkid/probe.c @@ -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)); diff --git a/lib/blkid/probe.h b/lib/blkid/probe.h index d8b6959dc..006760006 100644 --- a/lib/blkid/probe.h +++ b/lib/blkid/probe.h @@ -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