Re: [LTP] [PATCH] llistxattr03: Convert docs to docparse

Petr Vorel
2024-11-12T22:50:10Z

Hi all,

...
> > -* Description:
> > -* llistxattr is identical to listxattr. an empty buffer of size zero
> > -* can return the current size of the list of extended attribute names,
> > -* which can be used to estimate a suitable buffer.
> > -*/
> > + * Copyright (c) 2016 Fujitsu Ltd.
> > + * Author: Xiao Yang <yangx.jy@cn.fujitsu.com>
> > + */
> > +
> > +/*\
> > + * [Description]
> > + *
> > + * llistxattr is identical to listxattr. An empty buffer of size zero
> > + * can return the current size of the list of extended attribute names,
> > + * which can be used to estimate a suitable buffer.
> > + */

IMHO the best description was in v1 of the test:

https://lore.kernel.org/ltp/1454058489-25625-3-git-send-email-yangx.jy@cn.fujitsu.com/

llistxattr(2) with an empty buffer of size zero can return
the current size of the list of extended attribute names.

What was then in v3 committed is slightly misleading.

"llistxattr is identical to listxattr" is from man page, but it's IMHO
irrelevant. Also first "can" is wrong (it should always work, not just
sometimes).

I dared to rewrite before merge:

* Verify that llistxattr(2) call with zero size returns the current size of the
* list of extended attribute names, which can be used to determine the size of
* the buffer that should be supplied in a subsequent llistxattr(2) call.

Thanks!

Kind regards,
Petr