mirror of
git://sourceware.org/git/lvm2.git
synced 2024-10-15 01:01:12 +03:00
libdm: use 'unsigned' for major minor
Although linux uses 'dev_t' as 'unsigned long int' on 64bit, it's easier to print with just '%u' instead of '%lu'.
This commit is contained in:
parent
e1fd179dc5
commit
cdcd482fa4
@ -15,8 +15,8 @@
|
||||
#ifndef _LIBDM_KDEV_H
|
||||
#define _LIBDM_KDEV_H
|
||||
|
||||
#define MAJOR(dev) ((dev & 0xfff00) >> 8)
|
||||
#define MINOR(dev) ((dev & 0xff) | ((dev >> 12) & 0xfff00))
|
||||
#define MAJOR(dev) (((unsigned)dev & 0xfff00) >> 8)
|
||||
#define MINOR(dev) (((unsigned)dev & 0xff) | (((unsigned)dev >> 12) & 0xfff00))
|
||||
#define MKDEV(ma,mi) (((dev_t)mi & 0xff) | ((dev_t)ma << 8) | (((dev_t)mi & ~0xff) << 12))
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user