@@ -33,7 +33,7 @@ const field_t attr_sf_hdr_flds[] = {
{ NULL }
};
-#define EOFF(f) bitize(offsetof(xfs_attr_sf_entry_t, f))
+#define EOFF(f) bitize(offsetof(struct xfs_attr_sf_entry, f))
const field_t attr_sf_entry_flds[] = {
{ "namelen", FLDT_UINT8D, OI(EOFF(namelen)), C1, 0, TYP_NONE },
{ "valuelen", FLDT_UINT8D, OI(EOFF(valuelen)), C1, 0, TYP_NONE },
@@ -56,10 +56,10 @@ attr_sf_entry_name_count(
void *obj,
int startoff)
{
- xfs_attr_sf_entry_t *e;
+ struct xfs_attr_sf_entry *e;
ASSERT(bitoffs(startoff) == 0);
- e = (xfs_attr_sf_entry_t *)((char *)obj + byteize(startoff));
+ e = (struct xfs_attr_sf_entry *)((char *)obj + byteize(startoff));
return e->namelen;
}
@@ -69,7 +69,7 @@ attr_sf_entry_size(
int startoff,
int idx)
{
- xfs_attr_sf_entry_t *e;
+ struct xfs_attr_sf_entry *e;
int i;
xfs_attr_shortform_t *sf;
@@ -86,10 +86,10 @@ attr_sf_entry_value_count(
void *obj,
int startoff)
{
- xfs_attr_sf_entry_t *e;
+ struct xfs_attr_sf_entry *e;
ASSERT(bitoffs(startoff) == 0);
- e = (xfs_attr_sf_entry_t *)((char *)obj + byteize(startoff));
+ e = (struct xfs_attr_sf_entry *)((char *)obj + byteize(startoff));
return e->valuelen;
}
@@ -100,11 +100,11 @@ attr_sf_entry_value_offset(
int startoff,
int idx)
{
- xfs_attr_sf_entry_t *e;
+ struct xfs_attr_sf_entry *e;
ASSERT(bitoffs(startoff) == 0);
ASSERT(idx == 0);
- e = (xfs_attr_sf_entry_t *)((char *)obj + byteize(startoff));
+ e = (struct xfs_attr_sf_entry *)((char *)obj + byteize(startoff));
return bitize((int)((char *)&e->nameval[e->namelen] - (char *)e));
}
@@ -126,7 +126,7 @@ attr_shortform_list_offset(
int startoff,
int idx)
{
- xfs_attr_sf_entry_t *e;
+ struct xfs_attr_sf_entry *e;
int i;
xfs_attr_shortform_t *sf;
@@ -145,7 +145,7 @@ attrshort_size(
int startoff,
int idx)
{
- xfs_attr_sf_entry_t *e;
+ struct xfs_attr_sf_entry *e;
int i;
xfs_attr_shortform_t *sf;
@@ -1371,7 +1371,7 @@ process_sf_attr(
*/
xfs_attr_shortform_t *asfp;
- xfs_attr_sf_entry_t *asfep;
+ struct xfs_attr_sf_entry *asfep;
int ino_attr_size;
int i;
@@ -1413,7 +1413,7 @@ process_sf_attr(
asfep->valuelen);
}
- asfep = (xfs_attr_sf_entry_t *)((char *)asfep +
+ asfep = (struct xfs_attr_sf_entry *)((char *)asfep +
XFS_ATTR_SF_ENTSIZE(asfep));
}
@@ -733,7 +733,7 @@ xfs_attr_shortform_add(
size = XFS_ATTR_SF_ENTSIZE_BYNAME(args->namelen, args->valuelen);
xfs_idata_realloc(dp, size, XFS_ATTR_FORK);
sf = (xfs_attr_shortform_t *)ifp->if_u1.if_data;
- sfe = (xfs_attr_sf_entry_t *)((char *)sf + offset);
+ sfe = (struct xfs_attr_sf_entry *)((char *)sf + offset);
sfe->namelen = args->namelen;
sfe->valuelen = args->valuelen;
@@ -835,7 +835,7 @@ int
xfs_attr_shortform_lookup(xfs_da_args_t *args)
{
xfs_attr_shortform_t *sf;
- xfs_attr_sf_entry_t *sfe;
+ struct xfs_attr_sf_entry *sfe;
int i;
struct xfs_ifork *ifp;
@@ -13,7 +13,6 @@
* to fit into the literal area of the inode.
*/
typedef struct xfs_attr_sf_hdr xfs_attr_sf_hdr_t;
-typedef struct xfs_attr_sf_entry xfs_attr_sf_entry_t;
/*
* We generate this then sort it, attr_list() must return things in hash-order.
@@ -28,15 +27,17 @@ typedef struct xfs_attr_sf_sort {
} xfs_attr_sf_sort_t;
#define XFS_ATTR_SF_ENTSIZE_BYNAME(nlen,vlen) /* space name/value uses */ \
- (((int)sizeof(xfs_attr_sf_entry_t)-1 + (nlen)+(vlen)))
+ (((int)sizeof(struct xfs_attr_sf_entry)-1 + (nlen)+(vlen)))
#define XFS_ATTR_SF_ENTSIZE_MAX /* max space for name&value */ \
((1 << (NBBY*(int)sizeof(uint8_t))) - 1)
#define XFS_ATTR_SF_ENTSIZE(sfep) /* space an entry uses */ \
- ((int)sizeof(xfs_attr_sf_entry_t)-1 + (sfep)->namelen+(sfep)->valuelen)
+ ((int)sizeof(struct xfs_attr_sf_entry)-1 + \
+ (sfep)->namelen+(sfep)->valuelen)
#define XFS_ATTR_SF_NEXTENTRY(sfep) /* next entry in struct */ \
- ((xfs_attr_sf_entry_t *)((char *)(sfep) + XFS_ATTR_SF_ENTSIZE(sfep)))
+ ((struct xfs_attr_sf_entry *)((char *)(sfep) + \
+ XFS_ATTR_SF_ENTSIZE(sfep)))
#define XFS_ATTR_SF_TOTSIZE(dp) /* total space in use */ \
- (be16_to_cpu(((xfs_attr_shortform_t *) \
+ (be16_to_cpu(((struct xfs_attr_shortform *) \
((dp)->i_afp->if_u1.if_data))->hdr.totsize))
#endif /* __XFS_ATTR_SF_H__ */
@@ -211,7 +211,7 @@ process_shortform_attr(
int *repair)
{
xfs_attr_shortform_t *asf;
- xfs_attr_sf_entry_t *currententry, *nextentry, *tempentry;
+ struct xfs_attr_sf_entry *currententry, *nextentry, *tempentry;
int i, junkit;
int currentsize, remainingspace;
@@ -250,7 +250,7 @@ process_shortform_attr(
junkit = 0;
/* don't go off the end if the hdr.count was off */
- if ((currentsize + (sizeof(xfs_attr_sf_entry_t) - 1)) >
+ if ((currentsize + (sizeof(struct xfs_attr_sf_entry) - 1)) >
be16_to_cpu(asf->hdr.totsize))
break; /* get out and reset count and totSize */
@@ -322,7 +322,7 @@ process_shortform_attr(
do_warn(
_("removing attribute entry %d for inode %" PRIu64 "\n"),
i, ino);
- tempentry = (xfs_attr_sf_entry_t *)
+ tempentry = (struct xfs_attr_sf_entry *)
((intptr_t) currententry +
XFS_ATTR_SF_ENTSIZE(currententry));
memmove(currententry,tempentry,remainingspace);
@@ -338,7 +338,7 @@ process_shortform_attr(
}
/* Let's get ready for the next entry... */
- nextentry = (xfs_attr_sf_entry_t *)((intptr_t) nextentry +
+ nextentry = (struct xfs_attr_sf_entry *)((intptr_t) nextentry +
XFS_ATTR_SF_ENTSIZE(currententry));
currentsize = currentsize + XFS_ATTR_SF_ENTSIZE(currententry);