Re: *at syscalls for xattrs?

From: Jan Engelhardt
Date: Mon Jul 16 2007 - 03:56:21 EST



On Jul 15 2007 23:23, Al Viro wrote:
>On Sun, Jul 15, 2007 at 02:13:21PM -0700, Nicholas Miell wrote:
>>
>> I suspect he was asking for
>>
>> int getxattrat(int fd, const char *path, const char *name, void *value,
>> size_t size, int flags)
>> int setxattrat(int fd, const char *path, const char *name, void *value,
>> size_t size, int xattrflags, int atflags)
>>
>> rather than the ability to access xattrs as files.
>
>Just one question: what the bleeding hell for? Not that the rest of
>..at() family made any damn sense as an interface...

fd1 = open("dir1", O_DIRECTORY):
fd2 = open("dir2", O_DIRECTORY);
system("mount -t tmpfs none dir1");
system("mount -t tmpfs none dir2");
openat(fd1, "file1", O_RDWR | O_CREAT);
openat(fd2, "file2", O_RDWR | O_CREAT);

If you have a better way to accomplish this, let me know. :)



Jan
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/