removexattr, lremovexattr, fremovexattr - 拡張属性を削除する
#include <sys/types.h>
#include <sys/xattr.h>
int removexattr(const char *path, const char *name);
int lremovexattr(const char *path, const char *name);
int fremovexattr(int fd, const char *name);
Extended attributes are name:value pairs associated with inodes (files, directories, symbolic links, etc.). They are extensions to the normal attributes which are associated with all inodes in the system (i.e., the stat(2) data). A complete overview of extended attributes concepts can be found in xattr(7)EN.
removexattr() は、ファイルシステム内の指定された path に対応する、名前 name の拡張属性を削除する。
lremovexattr() は removexattr() と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル ではなく、リンクそのものの情報を削除する点だけが異なる。
fremovexattr() は removexattr() と同じだが、 path の代わりに fd で参照されたオープン済みファイルから拡張属性を削除するだけである点が異なる (fd は open(2) によって返される)。
An extended attribute name is a null-terminated string. The name includes a namespace prefix; there may be several, disjoint namespaces associated with an individual inode.
成功した場合、0 が返される。 失敗した場合、 -1 が返され、 errno に適切な値がセットされる。
- ENODATA
- The named attribute does not exist.
- ENOTSUP
- 拡張属性がそのファイルシステムでサポートされていない、 もしくは無効になっている。
上記に加えて、 stat(2) に書かれているエラーが発生する場合もある。
これらのシステムコールはカーネル 2.4 以降の Linux で利用できる。 glibc でのサポートはバージョン 2.3 以降で行われている。
これらのシステムコールは Linux 独自である。
この man ページは Linux man-pages プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は https://www.kernel.org/doc/man-pages/ に書かれている。