All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kasprzak <kas@fi.muni.cz>
To: Andreas Schwab <schwab@suse.de>
Cc: Arnd Bergmann <arnd@arndb.de>,
	torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cosa.h ioctl numbers
Date: Thu, 2 Dec 2004 16:56:00 +0100	[thread overview]
Message-ID: <20041202155559.GR11992@fi.muni.cz> (raw)
In-Reply-To: <jellcgag2v.fsf@sykes.suse.de>

Andreas Schwab wrote:
: Jan Kasprzak <kas@fi.muni.cz> writes:
: 
: > Andreas Schwab wrote:
: > : If you want real compatibility you should use size_t, which is what 2.4 is
: > : effectively using.
: > : 
: > 	I assume that sizeof(struct .. *) == sizeof(size_t) on i386.
: 
: This has nothing to do with this, but everything to do with
: sizeof(sizeof(foo)) == sizeof(size_t).  And COSAIODOWNLD does not expect a
: pointer to a pointer but a pointer to struct cosa_download, which means
: that _IOW('C',0xf2,struct cosa_download *) would be completely wrong
: anyway.

	I do not understand. The _IOW() macro just uses sizeof(_third_argument)
both on 2.4 and 2.6. And nothing else than sizeof() is done with the third
argument of _IOW(). So it does not matter what you put into the third
argument anyway, provided that you make sure the ABI (i.e. the type
and layout of the last argument to ioctl()) remains the same. The third
argument to _IOW() is just a (rather weak) helper which helps you to detect
the unwanted ABI change.

	Yes, I made a (small) mistake when writing cosa.h during the
Linux 2.1 development cycle, but since nobody cared and I am pretty
sure I did not change the layout of struct cosa_download at all since
Linux 2.1, I would rather have the 2.6 ioctl numbers the same
as in 2.1-2.4.
 
-Yenya

-- 
| Jan "Yenya" Kasprzak  <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839      Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/   Czech Linux Homepage: http://www.linux.cz/ |
> Whatever the Java applications and desktop dances may lead to, Unix will <
> still be pushing the packets around for a quite a while.      --Rob Pike <

  parent reply	other threads:[~2004-12-02 15:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-02 12:44 [PATCH] cosa.h ioctl numbers Jan Kasprzak
2004-12-02 12:58 ` Arnd Bergmann
2004-12-02 13:12   ` Jan Kasprzak
2004-12-02 13:57     ` Andreas Schwab
2004-12-02 14:11       ` Jan Kasprzak
2004-12-02 15:13         ` Andreas Schwab
2004-12-02 15:50           ` Linus Torvalds
2005-01-06 10:02             ` Jan Kasprzak
2004-12-02 15:56           ` Jan Kasprzak [this message]
2004-12-02 16:45             ` Andreas Schwab

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=20041202155559.GR11992@fi.muni.cz \
    --to=kas@fi.muni.cz \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwab@suse.de \
    --cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.