Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261463AbUK1NTZ (ORCPT ); Sun, 28 Nov 2004 08:19:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261465AbUK1NTZ (ORCPT ); Sun, 28 Nov 2004 08:19:25 -0500 Received: from neopsis.com ([213.239.204.14]:48807 "EHLO matterhorn.neopsis.com") by vger.kernel.org with ESMTP id S261463AbUK1NTJ (ORCPT ); Sun, 28 Nov 2004 08:19:09 -0500 Message-ID: <41A9D093.4090908@dbservice.com> Date: Sun, 28 Nov 2004 14:20:19 +0100 From: Tomas Carnecky User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Miklos Szeredi Cc: viro@parcelfarce.linux.theplanet.co.uk, ecki-news2004-05@lina.inka.de, linux-kernel@vger.kernel.org Subject: Re: Problem with ioctl command TCGETS References: <20041128121800.GZ26051@parcelfarce.linux.theplanet.co.uk> <20041128124847.GA26051@parcelfarce.linux.theplanet.co.uk> In-Reply-To: X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Neopsis-MailScanner-Information: Please contact the ISP for more information X-Neopsis-MailScanner: Found to be clean X-MailScanner-From: tom@dbservice.com Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1174 Lines: 33 Miklos Szeredi wrote: >>>>Think read(2)/write(2). We already have several barfbags too many, >>>>and that includes both ioctl() and setsockopt(). We are stuck with >>>>them for compatibility reasons, but why the hell would we need yet >>>>another one? >>> >>>You can't replace either ioctl() or setsockopt() with read/write can >>>you? Both of them set out-of-band information on file descriptors. >> >>Out-of-band == should be on a separate channel... > > > Tell me how? E.g. how would you set/get sound stream parameters if > not with ioctl()? > Maybe using sysfs? /sys/device/cdrom/param ? But then you'd have to open another file :( And what about somethink like: cdrom_fd = open("/dev/cdrom", O_RDWR) cdrom_param_fd = get_param_fd(cdrom_fd) /* a new syscall */ Now read/write to this param fd. And two new entries in the struct file_operations: write_param([same args as write]) read_param([same args as read]) tom - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/