lkml.org 
[lkml]   [2004]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cosa.h ioctl numbers


On Thu, 2 Dec 2004, Andreas Schwab wrote:
>
> 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.

We have similar "broken due to historical reasons" in other places.
There's no good way to fix them up, and it doesn't really matter _what_
fake type you use, as long as it happens to be the same size as the
original broken type on all architectures where it matters.

We've done different things in the past depending on exactly what the
numbers have been. Sometimes "size_t" (to keep pointers happy on both
32-bit and 64-bit architectures), sometimes "int" or "u32" (when somebody
had used an array _member_ instead of the array, or just had the size
explicitly haldcoded as an integer number, and then "size_t" just made it
"sizeof(int)" etc).

Sounds like it doesn't much matter in this case, any of the above would
work.

Linus
-
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/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.043 / U:2.416 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site