tech-kern archive

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

Re: extended attributes and lsextattr/extattr_list_file



YAMAMOTO Takashi <yamt%mwd.biglobe.ne.jp@localhost> wrote:

> python xattr library contains some #ifdef __FreeBSD__ code.
> i don't know if it works or not.

Yes, you have things like this:
http://svn.red-bean.com/bob/xattr/trunk/xattr/_xattr.c

"Converts a freebsd format attribute list into a NULL terminated list.
While the man page on extattr_list_file says it is NULL terminated, 
it is actually the first byte that is the length of the
following attribute."

At least this one can be functionnal, since it discovered the
documentation was wrong at that time :-)

> my guess is that the code was put in kernel so that it can be used
> by compat_linux.  i can be wrong.

Linux-like API for extended attribute has been in our native NetBSD
system calls for a while, but unfortunately, it was not available as a
libc stub, not <sys/xattr.h> was installed in /usr/include. 

This API is really useful in order to build and run natively a program
that was written for Linux. If you do not have it, you have to patch the
program to add API conversion functions.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index