chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libudev: get devnum from uevent file
[elogind.git]
/
udev
/
lib
/
test-libudev.c
diff --git
a/udev/lib/test-libudev.c
b/udev/lib/test-libudev.c
index fed4350c0908f41cf7f9999d97f9ca98da706942..421d0511a122e2d2361b974dee773847bbc301e5 100644
(file)
--- 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;
static void print_device(struct udev_device *device)
{
const char *str;
+ dev_t devnum;
int count;
struct udev_list *list;
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);
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);
count = 0;
list = udev_device_get_devlinks_list(device);