summaryrefslogtreecommitdiff
path: root/udev/lib/test-libudev.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-09-25 14:26:22 -0700
committerKay Sievers <kay.sievers@vrfy.org>2008-09-25 14:26:22 -0700
commit04f5d75f0cfaf82e1bbdec5e398e95b3d6f3f16d (patch)
treece2ef4fa1bdde015436587898293ff5023205f65 /udev/lib/test-libudev.c
parentbf7ad0ea662e747701cc66cdd1b33d22b6836cdf (diff)
libudev: get devnum from uevent file
Diffstat (limited to 'udev/lib/test-libudev.c')
-rw-r--r--udev/lib/test-libudev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/udev/lib/test-libudev.c b/udev/lib/test-libudev.c
index fed4350c09..421d0511a1 100644
--- a/udev/lib/test-libudev.c
+++ b/udev/lib/test-libudev.c
@@ -40,6 +40,7 @@ static void log_fn(struct udev *udev,
static void print_device(struct udev_device *device)
{
const char *str;
+ dev_t devnum;
int count;
struct udev_list *list;
@@ -56,6 +57,8 @@ static void print_device(struct udev_device *device)
printf("driver: '%s'\n", str);
str = udev_device_get_devnode(device);
printf("devname: '%s'\n", str);
+ devnum = udev_device_get_devnum(device);
+ printf("devnum: %u:%u\n", major(devnum), minor(devnum));
count = 0;
list = udev_device_get_devlinks_list(device);