diff options
author | dzwdz | 2024-08-18 23:06:26 +0200 |
---|---|---|
committer | dzwdz | 2024-08-18 23:06:26 +0200 |
commit | 8b4a2d50de67b746bcc472bd46c55d83eff668fc (patch) | |
tree | 21bcf9814b07bc54e7705f4e9ae93528d627e838 /man/setxattr.2 | |
parent | 446acde84c7f244792bf412996678254ee296356 (diff) |
Diffstat (limited to 'man/setxattr.2')
-rw-r--r-- | man/setxattr.2 | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/man/setxattr.2 b/man/setxattr.2 new file mode 100644 index 0000000..0690d35 --- /dev/null +++ b/man/setxattr.2 @@ -0,0 +1,59 @@ +.Dd August 18, 2024 +.Dt SETXATTR 2 +.Os Camellia +.Sh NAME +.Nm setxattr +.Nd set file attribute +.Sh SYNOPSIS +.In camellia/syscalls.h +.Ft ssize_t +.Fo _sys_setxattr +.Fa "hid_t h" +.Fa "const char *name" +.Fa "const void *buf" +.Fa "size_t len" +.Fa "int flags" +.Fc +.Sh DESCRIPTION +.Nm +sets the attribute of +.Fa h +named by +.Fa name +to the contents of +.Fa buf . +.Fa flags +is reserved for future use, for now it has to be 0. +.Pp +For more details see +.Xr getxattr 2 . +.Sh RETURN VALUES +.Nm +returns +.Fa len +or a negative value on failure. +The most common errors are: +.Bl -tag -width EGENERIC +.It Er ENOSYS +The filesystem doesn't support xattrs. +.It Er EGENERIC +The filesystem probably doesn't support xattrs, +and it wasn't written very well. +Sorry. +.It Er EACCES +You lack the permission to write this xattr. +.El +.Pp +In theory filesystems can return a nonnegative value different from +.Fa len , +but that shouldn't ever happen. +.Sh SEE ALSO +.Xr getxattr 2 +.Sh BUGS +There's no way to delete attributes right now. +This will probably be done with some sort of +.Dv XATTR_DELETE +flag. +.Sh RATIONALE +See +.Xr getxattr 2 . |