Lines Matching refs:eap
87 * EXTATTR_NEXT(eap) returns a pointer to the next extended attribute
88 * following eap.
89 * EXTATTR_CONTENT(eap) returns a pointer to the extended attribute
90 * content referenced by eap.
91 * EXTATTR_CONTENT_SIZE(eap) returns the size of the extended attribute
92 * content referenced by eap.
93 * EXTATTR_SET_LENGTHS(eap, contentsize) called after initializing the
97 #define EXTATTR_NEXT(eap) \
98 ((struct extattr *)(((void *)(eap)) + (eap)->ea_length))
99 #define EXTATTR_CONTENT(eap) (((void *)(eap)) + EXTATTR_BASE_LENGTH(eap))
100 #define EXTATTR_CONTENT_SIZE(eap) \
101 ((eap)->ea_length - EXTATTR_BASE_LENGTH(eap) - (eap)->ea_contentpadlen)
102 #define EXTATTR_BASE_LENGTH(eap) \
103 ((sizeof(struct extattr) + (eap)->ea_namelength + 7) & ~7)
104 #define EXTATTR_SET_LENGTHS(eap, contentsize) do { \
105 KASSERT(((eap)->ea_name[0] != 0), \
107 (eap)->ea_namelength = strlen((eap)->ea_name); \
108 (eap)->ea_contentpadlen = ((contentsize) % 8) ? \
110 (eap)->ea_length = EXTATTR_BASE_LENGTH(eap) + \
111 (contentsize) + (eap)->ea_contentpadlen; \