> @@ -0,0 +1,34 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later */ > +/* > + * Copyright (c) 2024 Oracle. All Rights Reserved. > + * Author: Darrick J. Wong <djwong@xxxxxxxxxx> > + */ > +#ifndef __LIBFROG_FAKELIBATTR_H__ > +#define __LIBFROG_FAKELIBATTR_H__ > + > +struct attrlist_cursor; Maybe this file could use a common that it emulates libattr APIs / helpers? > + struct xfs_attrlist_cursor cur = { }; > char attrbuf[XFS_XATTR_LIST_MAX]; > char keybuf[XATTR_NAME_MAX + 1]; > - struct attrlist *attrlist = (struct attrlist *)attrbuf; > - struct attrlist_ent *ent; > + struct xfs_attrlist *attrlist = (struct xfs_attrlist *)attrbuf; Overly long line. And as mentioned in reply to Carlos version of this we're probably better of just dynamically allocating the buffer here and do away with the casting. The rest looks good to me.