public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: Xiao Yang <yangx.jy@fujitsu.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] llistxattr03: Convert docs to docparse
Date: Tue, 12 Nov 2024 23:49:48 +0100	[thread overview]
Message-ID: <20241112224948.GD234224@pevik> (raw)
In-Reply-To: <Zyn/IUYuWpAoswZP@wegao>

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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2024-11-12 22:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-31  8:59 [LTP] [PATCH] llistxattr03: Convert docs to docparse Ma Xinjian via ltp
2024-11-05 11:18 ` Wei Gao via ltp
2024-11-12 22:49   ` Petr Vorel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241112224948.GD234224@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=wegao@suse.com \
    --cc=yangx.jy@fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox