aboutgitcodelistschat:MatrixIRC
path: root/demo/fsetxattr.c
blob: 6ee423a0d8a56199248a9a6a20b316e4421be2ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <sys/stat.h>
#include <sys/xattr.h>
#include <fcntl.h>
#include <string.h>

int main(int argc, char **argv)
{
	int fd = open(argv[1], O_RDONLY);

	return fsetxattr(fd, argv[2], argv[3], strlen(argv[3]) + 1, 0);
}