Commit 2d0f864b authored by Nathan Scott's avatar Nathan Scott

[XFS] Make headers compile for more compiler variants; minor cleanup.

SGI-PV: 949432
SGI-Modid: xfs-linux-melb:xfs-kern:25184a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent d2c32edf
...@@ -64,7 +64,7 @@ typedef int (*xfs_dir2_put_t)(struct xfs_dir2_put_args *pa); ...@@ -64,7 +64,7 @@ typedef int (*xfs_dir2_put_t)(struct xfs_dir2_put_args *pa);
typedef struct xfs_dir2_put_args { typedef struct xfs_dir2_put_args {
xfs_off_t cook; /* cookie of (next) entry */ xfs_off_t cook; /* cookie of (next) entry */
xfs_intino_t ino; /* inode number */ xfs_intino_t ino; /* inode number */
struct xfs_dirent *dbp; /* buffer pointer */ xfs_dirent_t *dbp; /* buffer pointer */
char *name; /* directory entry name */ char *name; /* directory entry name */
int namelen; /* length of name */ int namelen; /* length of name */
int done; /* output: set if value was stored */ int done; /* output: set if value was stored */
...@@ -75,18 +75,13 @@ typedef struct xfs_dir2_put_args { ...@@ -75,18 +75,13 @@ typedef struct xfs_dir2_put_args {
/* /*
* Other interfaces used by the rest of the dir v2 code. * Other interfaces used by the rest of the dir v2 code.
*/ */
extern int extern int xfs_dir2_grow_inode(struct xfs_da_args *args, int space,
xfs_dir2_grow_inode(struct xfs_da_args *args, int space,
xfs_dir2_db_t *dbp); xfs_dir2_db_t *dbp);
extern int xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp,
extern int int *vp);
xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp, int *vp); extern int xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp,
int *vp);
extern int extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db,
xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp, int *vp);
extern int
xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db,
struct xfs_dabuf *bp); struct xfs_dabuf *bp);
#endif /* __XFS_DIR2_H__ */ #endif /* __XFS_DIR2_H__ */
...@@ -35,19 +35,21 @@ typedef struct { __uint8_t i[sizeof(xfs_ino_t)]; } xfs_dir_ino_t; ...@@ -35,19 +35,21 @@ typedef struct { __uint8_t i[sizeof(xfs_ino_t)]; } xfs_dir_ino_t;
* and the elements much be memcpy'd out into a work area to get correct * and the elements much be memcpy'd out into a work area to get correct
* alignment for the inode number fields. * alignment for the inode number fields.
*/ */
typedef struct xfs_dir_shortform { typedef struct xfs_dir_sf_hdr { /* constant-structure header block */
struct xfs_dir_sf_hdr { /* constant-structure header block */
xfs_dir_ino_t parent; /* parent dir inode number */ xfs_dir_ino_t parent; /* parent dir inode number */
__uint8_t count; /* count of active entries */ __uint8_t count; /* count of active entries */
} hdr; } xfs_dir_sf_hdr_t;
struct xfs_dir_sf_entry {
typedef struct xfs_dir_sf_entry {
xfs_dir_ino_t inumber; /* referenced inode number */ xfs_dir_ino_t inumber; /* referenced inode number */
__uint8_t namelen; /* actual length of name (no NULL) */ __uint8_t namelen; /* actual length of name (no NULL) */
__uint8_t name[1]; /* name */ __uint8_t name[1]; /* name */
} list[1]; /* variable sized array */ } xfs_dir_sf_entry_t;
typedef struct xfs_dir_shortform {
xfs_dir_sf_hdr_t hdr;
xfs_dir_sf_entry_t list[1]; /* variable sized array */
} xfs_dir_shortform_t; } xfs_dir_shortform_t;
typedef struct xfs_dir_sf_hdr xfs_dir_sf_hdr_t;
typedef struct xfs_dir_sf_entry xfs_dir_sf_entry_t;
/* /*
* We generate this then sort it, so that readdirs are returned in * We generate this then sort it, so that readdirs are returned in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment