Extended attribute interfaces

Boris Popov bp at butya.kz
Mon Jun 19 01:22:58 GMT 2000


On Sun, 18 Jun 2000, Robert Watson wrote:

> I've attached six manual pages for components of the FreeBSD extended
> attribute interface.  They are largely in sync with the implementation.
> 
[skip]

> setextattr.8.txt	Userland generic ea-setting tool

	It will be more consistent with existing commands if 'filename'
argument will be the last one:

	setextattr attrname attrvalue filename [filename...]

instead of

	setextattr attrname filename attrvalue

This also gives ability to perform things like:

	setextattr dosattr -r *

	which will remove 'read only' bit on the all files in the
specified directory.

> Open points of discussion include:
> 
> 1) Ability to retrieve list of attributes on a file or directory --
>    presumably something dirent-like, but I'd like to hear about what both
>    the SGI folk and Andreas implemented, as there are many ways to do this
>    (and I have implemented none of them :-).  Retriving is useful for
>    backups (probably only in the application namespace, see below).

	This might be implemented as a call to the getextattr() function
with reserved attribute name (something like 'ENUMATTRIBUTES') which will
give the list of supported extended attributes and properties of each
attribute.

> 2) Error value for non-present extended attribute.  Currently I'm using
>    ENOENT, which is blatently confusing and improper :-).  There has been
>    discussion of introducing a new error value, probably EEXTATTR or
>    ENOATTR, both of which seem decent.

	Yes, ENOENT is incorrect because it conflicts with the error code
produced by vnode lookup operation. In the smbfs implementation I've
choosen EINVAL instead.

--
Boris Popov
http://www.butya.kz/~bp/

To Unsubscribe: send mail to majordomo at cyrus.watson.org
with "unsubscribe posix1e" in the body of the message



More information about the posix1e mailing list