Re: chflags() or...?

Janos Farkas (Janos.Farkas-#fqqtaPIv4ZmlKMYw4Eo5bK35BSu@shadow.banki.hu)
Fri, 15 Aug 1997 12:34:18 +0200


On 1997-08-15 at 04:55:33, Theodore Y. Ts'o replied:
>> Date: Fri, 15 Aug 1997 10:42:21 +0200
>> From: Janos Farkas <Janos.Farkas-#QK62Trgra5Kf5.RZk0HZ1/cpKyi@shadow.banki.hu>
>
>> Hmm.. I was a bit tired recently, and thought about something like a
>> new syscall to open an _inode_, but later realised that it could be
>> done with a flag to open(), maybe O_INODE, O_NOFOLLOW, or whatever.
>
>> Does that sound too ill? If it fits into VFS somehow, it could be
>> a quick solution to:
>
> I understand the concern to try to keep the number of system calls to a

You are right, behind the scenes I hoped for not creating a new syscall for
gettid() and for every new get-me-status-x of this process, instead making
an unified syscall, but I'll be quiet now. :)

> minimum, but it sounds really ill to me at least. Adding this kind of
> modal interface to system calls seems like a really bad idea to me....
> we would be fundamentally changing what ioctl() does depending on an
> open flag, and that makes me feel really icky.

But it wouldn't change the behavior of ioctl(), just that of open().
The resulting fd would represent the inode of the (f.i.) symlink,
thus read() et al do not necessarily makes sense. In this perspective,
access to an inode may be useful, (what was only possible for a few
selected syscalls like chmod, unlink, etc.). And it seemed to me
"clean", at least in a quite twisted way. :)

-- 
Janos - Don't worry, my address works.  I'm just bored of spam.