mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries Brouwer <aebr@win.tue.nl>
To: Matthew Wilcox <willy@debian.org>
Cc: Linus Torvalds <torvalds@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] use size_t for the broken ioctl numbers
Date: Mon, 8 Sep 2003 14:38:46 +0200	[thread overview]
Message-ID: <20030908123846.GA15553@win.tue.nl> (raw)
In-Reply-To: <20030907062248.GX18654@parcelfarce.linux.theplanet.co.uk>

On Sun, Sep 07, 2003 at 07:22:48AM +0100, Matthew Wilcox wrote:

> Clearly it's too late to change the ioctl definitions, but we can at
> least stop people from copying them and making the same mistake.

> -#define BLKELVSET  _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t))/* elevator set */
> +#define BLKELVSET  _IOW(0x12,107,size_t)/* elevator set */

Here we lose information - I don't like that.
Often it is important to know what kind of argument an ioctl has,
and that info should be easy to find.

I see other parts of this thread discuss the question on how to force people
to do things right in new cases. For old cases, instead of throwing out
the information that a blkelv_ioctl_arg_t is involved, I would like to write

#define BLKELVSET  _IOW_BAD(0x12,107,blkelv_ioctl_arg_t)

with

#define _IOW_BAD( ... ) _IOW(..., sizeof(...))

(with s/_IOW/_IOW_NOCK/ in case _IOW is changed so as to check).

Andries


  parent reply	other threads:[~2003-09-08 12:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-07  6:22 Matthew Wilcox
2003-09-07 16:48 ` Andreas Schwab
2003-09-07 17:29   ` Linus Torvalds
2003-09-07 17:34     ` Andreas Schwab
2003-09-08 13:10       ` Ingo Oeser
2003-09-08 12:38 ` Andries Brouwer [this message]
2003-09-08 15:13   ` Linus Torvalds
2003-09-08 18:40     ` Andries Brouwer
2003-09-08 18:54       ` Linus Torvalds
2003-09-08 19:28       ` Randy.Dunlap
2003-09-08 19:53         ` Jeff Garzik
2003-09-08 20:15           ` Linus Torvalds
2003-09-08 20:26             ` Dave Jones
2003-09-08 21:53               ` Jeff Garzik
2003-09-08 22:25                 ` Dave Jones
2003-09-08 20:27         ` Andries Brouwer
2003-09-08 20:43           ` Linus Torvalds
2003-09-09 11:40   ` Jens Axboe
     [not found] <tbGb.75d.15@gated-at.bofh.it>
     [not found] ` <tbPO.7j9.5@gated-at.bofh.it>
2003-09-07 21:28   ` Arnd Bergmann
2003-09-07 23:15     ` Linus Torvalds
2003-09-07 23:21       ` Linus Torvalds
2003-09-08 13:03         ` Arnd Bergmann
2003-09-08 13:33           ` Andreas Schwab
2003-09-08 13:35           ` Andries Brouwer

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=20030908123846.GA15553@win.tue.nl \
    --to=aebr@win.tue.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=willy@debian.org \
    /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

all inboxes | Powered by JetHome®