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: udev_device_get_devname -> udev_device_get_devnode
[elogind.git]
/
udev
/
lib
/
test-libudev.c
diff --git
a/udev/lib/test-libudev.c
b/udev/lib/test-libudev.c
index 4dcc80a141c666c2e446f44cb451c44840eab7be..0a0d754b38e34441453256efeb5f6e8d7271e730 100644
(file)
--- a/
udev/lib/test-libudev.c
+++ b/
udev/lib/test-libudev.c
@@
-17,8
+17,6
@@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
@@
-56,6
+54,8
@@
static void print_device(struct udev_device *device)
int count;
printf("*** device: %p ***\n", device);
int count;
printf("*** device: %p ***\n", device);
+ str = udev_device_get_action(device);
+ printf("action: '%s'\n", str);
str = udev_device_get_syspath(device);
printf("syspath: '%s'\n", str);
str = udev_device_get_devpath(device);
str = udev_device_get_syspath(device);
printf("syspath: '%s'\n", str);
str = udev_device_get_devpath(device);
@@
-64,7
+64,7
@@
static void print_device(struct udev_device *device)
printf("subsystem: '%s'\n", str);
str = udev_device_get_driver(device);
printf("driver: '%s'\n", str);
printf("subsystem: '%s'\n", str);
str = udev_device_get_driver(device);
printf("driver: '%s'\n", str);
- str = udev_device_get_devn
am
e(device);
+ str = udev_device_get_devn
od
e(device);
printf("devname: '%s'\n", str);
count = udev_device_get_devlinks(device, print_devlinks_cb, NULL);
printf("found %i links\n", count);
printf("devname: '%s'\n", str);
count = udev_device_get_devlinks(device, print_devlinks_cb, NULL);
printf("found %i links\n", count);
@@
-114,11
+114,12
@@
static int test_device_parents(struct udev *udev, const char *syspath)
return 0;
}
return 0;
}
-static int devices_enum_cb(struct udev *udev,
- const char *devpath, const char *subsystem, const char *name,
- void *data)
+static int devices_enum_cb(struct udev_device *device, void *data)
{
{
- printf("device: '%s' (%s) '%s'\n", devpath, subsystem, name);
+ printf("device: '%s' (%s) '%s'\n",
+ udev_device_get_syspath(device),
+ udev_device_get_subsystem(device),
+ udev_device_get_sysname(device));
return 0;
}
return 0;
}