Re: What should listxattr() return if there are no xattrs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Following up long after the fact...)

Thanks for CCing me Ted.

On Mon, Dec 20, 2010 at 2:26 PM, Theodore Ts'o <tytso@xxxxxxx> wrote:
>
> Wang Sheng-Hui has sent some patches that change listxattr for the extN
> file systems to return ENODATA when an inode has no extended attributes
> (instead of zero).
>
> I've noted that neither btrfs nor XFS do this, and would have rejected
> the patches on that basis. However, I'll note the man page for the
> listxattr(2) syscall is ambiguous:
>
>     On  success,  a  positive number is returned indicating the size of the
>     extended attribute name list.  On failure, -1 is returned and errno  is
>     set appropriately.
>
> It states that on success a _positive_ number is returned.  I've looked
> and this wordining is in SGI's man page as well.  I suspect the man page
> should be corrected to sate that "non-negative" number is returned?

Thanks. Fixed now, to say "nonnegative".

Cheers,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux