p Since was no provision in the UFS1 filesystem for attributes, they are stored as regular files and directories in the filesystem under the
a "/.attribute" directory. By convention, are usually two directories directly under, separating two namespaces: .Dq user and .Dq system . Under these, named attributes that can be created and managed using .Xr extattrctl 8 .
p This programming interface is currently only used by .Xr extattrctl 8 , and is not intended for general use. .Sh PARAMETERS l -tag -width indent t Fa path The path to the mount point of the filesystem. t Fa cmd The command to execute. Valid commands are: l -tag -width indent t Dv UFS_EXTATTR_CMD_ENABLE Enable a specific extended attribute. t Dv UFS_EXTATTR_CMD_DISABLE Disable a specific extended attribute. t Dv UFS_EXTATTR_CMD_START Start extended attribute support on the filesystem. t Dv UFS_EXTATTR_CMD_STOP Stop extended attribute support on the filesystem. .El t Fa attrname The name of the extended attribute (for relevant commands). t Fa attrnamespace The attribute namespace, such as .Dv EXTATTR_NAMESPACE_USER or .Dv EXTATTR_NAMESPACE_SYSTEM . t Fa filename The path to a backing file for extended attribute storage (if required by the command). .El .Sh RETURN VALUES Upon successful completion, .Fn extattrctl returns .Dv 0 . Otherwise, .Dv -1 is returned, and .Va errno is set to indicate the error. .Sh EXAMPLES Enable an attribute on a filesystem: d -literal -offset indent #include <sys/extattr.h> #include <ufs/ufs/extattr.h> if (extattrctl("/home", UFS_EXTATTR_CMD_ENABLE, "comment", EXTATTR_NAMESPACE_USER, "/.attribute/user/comment") == -1) err(EXIT_FAILURE, "extattrctl"); .Ed .Sh ERRORS The .Fn extattrctl system call may fail with the following errors: l -tag -width Bq -offset indent t Bq Er EACCES Permission denied. t Bq Er EINVAL Invalid arguments were provided. t Bq Er ENOENT The specified path, attribute, or file does not exist. t Bq Er ENOTSUP The filesystem does not support extended attributes. .El .Sh SEE ALSO .Xr extattr_delete_file 2 , .Xr extattr_get_file 2 , .Xr extattr_list_file 2 , .Xr extattr_set_file 2 , .Xr extattrctl 8 . .Sh HISTORY The .Fn extattrctl system call was imported from .Fx 5.0 in .Nx 4.0 .