From: Jan Engelhardt <jengelh@linux01.gwdg.de>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: viro@parcelfarce.linux.theplanet.co.uk,
oebilgen@uekae.tubitak.gov.tr, linux-kernel@vger.kernel.org
Subject: Re: Problem with ioctl command TCGETS
Date: Sun, 28 Nov 2004 11:08:38 +0100 (MET) [thread overview]
Message-ID: <Pine.LNX.4.53.0411281104100.20168@yvahk01.tjqt.qr> (raw)
In-Reply-To: <E1CYLpf-0001VQ-00@dorka.pomaz.szeredi.hu>
>On the subject of ioctls: what about a replacement syscall:
>
> /**
> * Getting and setting file parameters safely (ioctl done right)
> *
> * @fd file descriptor
> * @param name of the parameter to get/set
> * @dir direction flag indicating either get, set, or set-get
> * @value value to set parameter to (set) or store current value into (get)
> * @size size of value
> */
> int fparam(int fd, const char *param, int dir, void *value, size_t size);
>
>I know it's been talked about in the past. Is anyone interested?
The idea is nice, yet the "dir" and "size" parameters in the original _IO*
macros are only there (IMO) to protect against using the wrong value for the
wrong operation on the wrong fd/file/device/socket/etc.
What is the point in making "param" a char*? You would need to parse it down
again.
Oh yeah and call it ioctl2(), sounds more cryptical :)
Jan Engelhardt
--
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, www.gwdg.de
next prev parent reply other threads:[~2004-11-28 10:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-28 0:22 Problem with ioctl command TCGETS Ozan Eren Bilgen
2004-11-28 0:39 ` Al Viro
2004-11-28 9:59 ` Miklos Szeredi
2004-11-28 10:08 ` Jan Engelhardt [this message]
2004-11-28 10:18 ` Miklos Szeredi
2004-11-28 10:28 ` Bernd Eckenfels
2004-11-28 10:56 ` Wichert Akkerman
2004-11-28 11:52 ` Bernd Eckenfels
2004-11-28 11:22 ` Miklos Szeredi
2004-11-28 12:18 ` Al Viro
2004-11-28 12:32 ` Miklos Szeredi
2004-11-28 12:48 ` Al Viro
2004-11-28 12:52 ` Miklos Szeredi
2004-11-28 13:03 ` Al Viro
2004-11-28 14:30 ` Tomas Carnecky
2004-11-28 15:27 ` Al Viro
2004-11-28 18:23 ` Tomas Carnecky
2004-11-28 18:51 ` Miklos Szeredi
2004-12-10 4:01 ` Ingo Oeser
2004-11-28 13:20 ` Tomas Carnecky
2004-11-28 14:05 ` Al Viro
2004-11-28 13:07 ` Tomas Carnecky
2004-11-28 13:11 ` Al Viro
2004-11-28 13:19 ` Tomas Carnecky
2004-11-28 17:42 ` Alan Cox
2004-11-30 13:26 ` Pavel Machek
2004-11-30 15:46 ` Al Viro
2004-11-28 12:23 ` Bernd Eckenfels
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.53.0411281104100.20168@yvahk01.tjqt.qr \
--to=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=oebilgen@uekae.tubitak.gov.tr \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).