[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <469B2CAE.9010101@goop.org>
Date: Mon, 16 Jul 2007 01:30:38 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Jan Engelhardt <jengelh@...putergmbh.de>
CC: Al Viro <viro@....linux.org.uk>,
Nicholas Miell <nmiell@...cast.net>,
linux-fsdevel@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: *at syscalls for xattrs?
Jan Engelhardt wrote:
> 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. :)
>
This should work:
fchdir(fd1);
open("file1", O_RDWR | O_CREAT);
fchdir(fd2);
open("file2", O_RDWR | O_CREAT);
J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists