lkml.org 
[lkml]   [2003]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] new system call mknod64
Jamie Lokier wrote:
>>
>>The main advantage with making it a struct is that it keep people from
>>doing stupid stuff like (int)dev where dev is a kdev_t... There is
>>all kinds of shit like that in the kernel...
>
> If you want that good quality 64-bit code, try making it a struct
> containing just a u64 :)
>

Perhaps:

#if BITS_PER_LONG == 64
typedef struct { u64 val; } kdev_t;

/* Macros for major minor mkdev */
#else
typedef struct { u32 major, minor; } kdev_t;

/* Macros... */
#endif

-hpa


-
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:34    [W:0.075 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site