LibC: add device macros in sys/sysmacros.h
This commit is contained in:
parent
ebfd092075
commit
914f718767
|
@ -0,0 +1,8 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#define makedev(maj, min) ((dev_t)(maj) << 32 | (dev_t)(min))
|
||||||
|
|
||||||
|
#define major(dev) (((dev) >> 32) & 0xFFFFFFFF)
|
||||||
|
#define minor(dev) ( (dev) & 0xFFFFFFFF)
|
Loading…
Reference in New Issue