]> www.infradead.org Git - mtd-utils.git/commitdiff
Remove XATTR struct typedefs
authorDavid Woodhouse <dwmw2@infradead.org>
Sun, 14 May 2006 17:45:57 +0000 (18:45 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Sun, 14 May 2006 17:45:57 +0000 (18:45 +0100)
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
include/mtd/jffs2-user.h
mkfs.jffs2.c

index 8b53990159e03ce2ef491c2b867d673e1e536c16..bc5d99abad142ef1dd3666eb8bffa293e0ebea3b 100644 (file)
@@ -50,33 +50,33 @@ extern int target_endian;
 #define XATTR_TRUSTED_PREFIX           "trusted."
 #define XATTR_TRUSTED_PREFIX_LEN       (sizeof (XATTR_TRUSTED_PREFIX) - 1)
 
-typedef struct {
+struct jffs2_acl_entry {
        jint16_t        e_tag;
        jint16_t        e_perm;
        jint32_t        e_id;
-} jffs2_acl_entry;
+};
 
-typedef struct {
+struct jffs2_acl_entry_short {
        jint16_t        e_tag;
        jint16_t        e_perm;
-} jffs2_acl_entry_short;
+};
 
-typedef struct {
+struct jffs2_acl_header {
        jint32_t        a_version;
-} jffs2_acl_header;
+};
 
 /* copied from include/linux/posix_acl_xattr.h */
 #define POSIX_ACL_XATTR_VERSION 0x0002
 
-typedef struct {
+struct posix_acl_xattr_entry {
        uint16_t                e_tag;
        uint16_t                e_perm;
        uint32_t                e_id;
-} posix_acl_xattr_entry;
+};
 
-typedef struct {
-       uint32_t                a_version;
-       posix_acl_xattr_entry   a_entries[0];
-} posix_acl_xattr_header;
+struct posix_acl_xattr_header {
+       uint32_t                        a_version;
+       struct posix_acl_xattr_entry    a_entries[0];
+};
 
 #endif /* __JFFS2_USER_H__ */
index 02f57f9aa67a0489f87ebad3fdb43ebd0c317dde..fa4a5f39a64939fb8b9e197e779fde90af4d23de 100644 (file)
@@ -1052,22 +1052,22 @@ static struct {
        { 0, NULL, 0 }
 };
 
-static void formalize_posix_acl(char *xvalue, int *value_len)
+static void formalize_posix_acl(void *xvalue, int *value_len)
 {
-       posix_acl_xattr_header *pacl_header;
-       posix_acl_xattr_entry *pent, *plim;
-       jffs2_acl_header *jacl_header;
-       jffs2_acl_entry *jent;
-       jffs2_acl_entry_short *jent_s;
+       struct posix_acl_xattr_header *pacl_header;
+       struct posix_acl_xattr_entry *pent, *plim;
+       struct jffs2_acl_header *jacl_header;
+       struct jffs2_acl_entry *jent;
+       struct jffs2_acl_entry_short *jent_s;
        char buffer[XATTR_BUFFER_SIZE];
        int offset = 0;
 
-       pacl_header = (posix_acl_xattr_header *)xvalue;;
+       pacl_header = xvalue;;
        pent = pacl_header->a_entries;
-       plim = (posix_acl_xattr_entry *)(xvalue + *value_len);
+       plim = xvalue + *value_len;
 
-       jacl_header = (jffs2_acl_header *)buffer;
-       offset += sizeof(jffs2_acl_header);
+       jacl_header = (struct jffs2_acl_header *)buffer;
+       offset += sizeof(struct jffs2_acl_header);
        jacl_header->a_version = cpu_to_je32(JFFS2_ACL_VERSION);
 
        while (pent < plim) {
@@ -1076,15 +1076,15 @@ static void formalize_posix_acl(char *xvalue, int *value_len)
                case ACL_GROUP_OBJ:
                case ACL_MASK:
                case ACL_OTHER:
-                       jent_s = (jffs2_acl_entry_short *)(buffer + offset);
-                       offset += sizeof(jffs2_acl_entry_short);
+                       jent_s = (struct jffs2_acl_entry_short *)(buffer + offset);
+                       offset += sizeof(struct jffs2_acl_entry_short);
                        jent_s->e_tag = cpu_to_je16(le16_to_cpu(pent->e_tag));
                        jent_s->e_perm = cpu_to_je16(le16_to_cpu(pent->e_perm));
                        break;
                case ACL_USER:
                case ACL_GROUP:
-                       jent = (jffs2_acl_entry *)(buffer + offset);
-                       offset += sizeof(jffs2_acl_entry);
+                       jent = (struct jffs2_acl_entry *)(buffer + offset);
+                       offset += sizeof(struct jffs2_acl_entry);
                        jent->e_tag = cpu_to_je16(le16_to_cpu(pent->e_tag));
                        jent->e_perm = cpu_to_je16(le16_to_cpu(pent->e_perm));
                        jent->e_id = cpu_to_je32(le32_to_cpu(pent->e_id));