lkml.org 
[lkml]   [2003]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] new ioctl type checking causes gcc warning
    Date
    On Saturday 13 September 2003 02:31, Kevin P. Fleming wrote:
    > Does that mean that
    > these two lines:
    >
    > #define BLKGETSIZE64 _IOR(0x12,114,sizeof(__uint64_t))
    > #define BLKGETSIZE64 _IOR(0x12,114,__uint64_t)
    >
    > actually produce different ioctl numbers?

    Exactly. On 32 bit systems, the former is 0x80041272, the
    latter is 0x80081272. On 64 bit systems, they are both
    0x80081272.

    > If so, then I don't
    > understand how the kernel can continue to offer the old/invalid
    > interface when the new _IOR macro won't accept the first version any
    > longer.

    Inside the kernel, the first definition has to be changed to
    something like:

    #define BLKGETSIZE64 _IOR(0x12,114,size_t) /* broken: actually __u64 */
    or
    #define BLKGETSIZE64 _IOR_BAD(0x12,114,sizeof(__uint64_t)) /* broken */

    in order to get a definition that will pass the check and
    generate the well-known number.
    -
    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: 2005-03-22 13:48    [W:0.028 / U:0.180 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site