123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #include <endian.h>
- #include <sys/sysmacros.h>
- unsigned int
- gnu_dev_major (unsigned long long int dev)
- {
- return ((dev >> 8) & 0xfff) | ((unsigned int) (dev >> 32) & ~0xfff);
- }
- libc_hidden_def(gnu_dev_major)
- unsigned int
- gnu_dev_minor (unsigned long long int dev)
- {
- return (dev & 0xff) | ((unsigned int) (dev >> 12) & ~0xff);
- }
- libc_hidden_def(gnu_dev_minor)
- unsigned long long int
- gnu_dev_makedev (unsigned int major, unsigned int minor)
- {
- return ((minor & 0xff) | ((major & 0xfff) << 8)
- | (((unsigned long long int) (minor & ~0xff)) << 12)
- | (((unsigned long long int) (major & ~0xfff)) << 32));
- }
|