On Tue, Aug 27, 2024 at 02:27:07PM +0200, Carlos Maiolino wrote: > On Tue, Aug 27, 2024 at 05:16:47AM GMT, Christoph Hellwig wrote: > > > */ > > > + > > > #define ATTR_ENTRY(buffer, index) \ > > > > Spurious whitespace change. > > > > > ((struct xfs_attrlist_ent *) \ > > > &((char *)buffer)[ ((struct xfs_attrlist *)(buffer))->al_offset[index] ]) > > > > > > +/* Attr flags used within xfsprogs, must match the definitions from libattr */ > > > +#define ATTR_ROOT 0x0002 /* use root namespace attributes in op */ > > > +#define ATTR_SECURE 0x0008 /* use security namespaces attributes in op */ > > > > Why do we need these vs just using XFS_ATTR_ROOT/XFS_ATTR_SECURE from > > xfs_da_format.h? > > Because I didn't see XFS_ATTR_ROOT and XFS_ATTR_SECURE exists :) Well if we're reusing symbols from xfs_fs.h then change these to XFS_IOC_ATTR_ROOT and XFS_IOC_ATTR_SECURE. > I'll take a look on it, and if we don't really need to define ATTR_ROOT/SECURE, > I'll just keep ATTR_ENTRY locally to fsprops.h, we don't need a header file for > just a single definition IMO. <shrug> I'd have turned them into namespaced libfrog functions in libfrog/attr.h, and demacro'd ATTR_ENTRY too: static inline struct xfs_attrlist_ent * libfrog_attr_entry( struct xfs_attrlist *list, unsigned int index) { char *buffer = (char *)list; return (struct xfs_attrlist_ent *)&buffer[list->al_offset[index]]; } static inline int libfrog_attr_list_by_handle( void *hanp, size_t hlen, void *buf, size_t bufsize, int flags, struct xfs_attrlist_cursor *cursor) { return attr_list_by_handle(hanp, hlen, buf, bufsize, flags, (struct attrlist_cursor *)cursor); } --D > > > > > > + struct xfs_attrlist *attrlist = (struct xfs_attrlist *)attrbuf; > > > > Overly long line. > > Ok, Thanks! > > Carlos >