From: Alan Cox Date: Thu, 22 Sep 2016 21:48:14 +0000 (+0100) Subject: sys/types.h: add major/minor/makedev trio X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=0ad84618aca612fafdaa2e1e12c1449970a2217d;p=FUZIX.git sys/types.h: add major/minor/makedev trio --- diff --git a/Library/include/sys/types.h b/Library/include/sys/types.h index bae13731..8b272b33 100644 --- a/Library/include/sys/types.h +++ b/Library/include/sys/types.h @@ -77,4 +77,9 @@ typedef struct { #endif typedef int32_t clock_t; typedef uint32_t useconds_t; + +#define makedev(a,b) (((a) << 8) | (b)) +#define major(x) ((x) >> 8) +#define minor(x) ((x) & 0xFF) + #endif