Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
kdev_t.h File Reference
#include <uapi/linux/kdev_t.h>

Go to the source code of this file.

Macros

#define MINORBITS   20
 
#define MINORMASK   ((1U << MINORBITS) - 1)
 
#define MAJOR(dev)   ((unsigned int) ((dev) >> MINORBITS))
 
#define MINOR(dev)   ((unsigned int) ((dev) & MINORMASK))
 
#define MKDEV(ma, mi)   (((ma) << MINORBITS) | (mi))
 
#define print_dev_t(buffer, dev)   sprintf((buffer), "%u:%u\n", MAJOR(dev), MINOR(dev))
 
#define format_dev_t(buffer, dev)
 

Macro Definition Documentation

#define format_dev_t (   buffer,
  dev 
)
Value:
({ \
sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \
})

Definition at line 16 of file kdev_t.h.

#define MAJOR (   dev)    ((unsigned int) ((dev) >> MINORBITS))

Definition at line 9 of file kdev_t.h.

#define MINOR (   dev)    ((unsigned int) ((dev) & MINORMASK))

Definition at line 10 of file kdev_t.h.

#define MINORBITS   20

Definition at line 6 of file kdev_t.h.

#define MINORMASK   ((1U << MINORBITS) - 1)

Definition at line 7 of file kdev_t.h.

#define MKDEV (   ma,
  mi 
)    (((ma) << MINORBITS) | (mi))

Definition at line 11 of file kdev_t.h.

#define print_dev_t (   buffer,
  dev 
)    sprintf((buffer), "%u:%u\n", MAJOR(dev), MINOR(dev))

Definition at line 13 of file kdev_t.h.