From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id p5TE3fav104849 for ; Wed, 29 Jun 2011 09:03:42 -0500 Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 2B56B1D7DD36 for ; Wed, 29 Jun 2011 07:03:40 -0700 (PDT) Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net [173.166.109.252]) by cuda.sgi.com with ESMTP id mH8ml6aDwCT1bzDX for ; Wed, 29 Jun 2011 07:03:40 -0700 (PDT) Received: from hch by bombadil.infradead.org with local (Exim 4.76 #1 (Red Hat Linux)) id 1QbvMi-0008Kk-Kn for xfs@oss.sgi.com; Wed, 29 Jun 2011 14:03:40 +0000 Message-Id: <20110629140340.611673214@bombadil.infradead.org> Date: Wed, 29 Jun 2011 10:01:30 -0400 From: Christoph Hellwig Subject: [PATCH 21/27] xfs: cleanup the defintion of struct xfs_dir2_data_entry References: <20110629140109.003209430@bombadil.infradead.org> Content-Disposition: inline; filename=xfs-cleanup-xfs_dir2_data_entry List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: xfs@oss.sgi.com Remove the tag member which is at a variable offset after the actual name, and make name a real variable sized C99 array instead of the incorrect one-sized array which confuses (not only) gcc. Signed-off-by: Christoph Hellwig Index: xfs/fs/xfs/xfs_dir2_data.h =================================================================== --- xfs.orig/fs/xfs/xfs_dir2_data.h 2011-06-29 13:42:35.521563513 +0200 +++ xfs/fs/xfs/xfs_dir2_data.h 2011-06-29 13:43:03.284746440 +0200 @@ -98,14 +98,14 @@ typedef struct xfs_dir2_data_hdr { /* * Active entry in a data block. Aligned to 8 bytes. - * Tag appears as the last 2 bytes. + * + * After the variable length name field there is a 2 byte tag field, which + * can be accessed using xfs_dir2_data_entry_tag_p. */ typedef struct xfs_dir2_data_entry { __be64 inumber; /* inode number */ __u8 namelen; /* name length */ - __u8 name[1]; /* name bytes, no null */ - /* variable offset */ - __be16 tag; /* starting offset of us */ + __u8 name[]; /* name bytes, no null */ } xfs_dir2_data_entry_t; /* _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs