resourceview: redesign resource handling in a tree fashion
[lttv.git] / ltt / branches / poly / lttv / lttv / state.h
index 79b1f2f0393abde35fc38a1a3ce5b8f4668c6e04..c3bdf1385624b3235027f97c2b4f69cbf999e408 100644 (file)
@@ -411,6 +411,11 @@ static inline guint lttv_state_get_target_pid(LttvTracefileState *tfs)
 #define HDR_QUARKS 9
 #define HDR_QUARK 10
 
-#define MKDEV(ma,mi)    ((ma)<<8 | (mi))
+/* Device number manipulation macros from kernel source */
+#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))
 
 #endif // STATE_H
This page took 0.022483 seconds and 4 git commands to generate.