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
/
udevadm-info.c
diff --git
a/udev/udevadm-info.c
b/udev/udevadm-info.c
index 9ce83aabd884abecd04ab769b08b86180141504c..dbcaaffcdb473b99c835ba37dee21a5f7d0cd8c6 100644
(file)
--- a/
udev/udevadm-info.c
+++ b/
udev/udevadm-info.c
@@
-15,8
+15,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 <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@
-150,7
+148,7
@@
static void print_record(struct udev_device *device)
printf("P: %s\n", udev_device_get_devpath(device));
len = strlen(udev_get_dev_path(udev_device_get_udev(device)));
printf("P: %s\n", udev_device_get_devpath(device));
len = strlen(udev_get_dev_path(udev_device_get_udev(device)));
- printf("N: %s\n", &udev_device_get_devn
am
e(device)[len+1]);
+ printf("N: %s\n", &udev_device_get_devn
od
e(device)[len+1]);
i = device_get_devlink_priority(device);
if (i != 0)
printf("L: %i\n", i);
i = device_get_devlink_priority(device);
if (i != 0)
printf("L: %i\n", i);
@@
-165,18
+163,10
@@
static void print_record(struct udev_device *device)
printf("\n");
}
printf("\n");
}
-static int export_all_cb(struct udev *udev,
- const char *syspath, const char *subsystem, const char *name,
- void *data)
+static int export_all_cb(struct udev_device *device, void *data)
{
{
- struct udev_device *device;
-
- device = udev_device_new_from_syspath(udev, syspath);
- if (device == NULL)
- return 0;
- if (udev_device_get_devname(device) != NULL)
+ if (udev_device_get_devnode(device) != NULL)
print_record(device);
print_record(device);
- udev_device_unref(device);
return 0;
}
return 0;
}
@@
-446,12
+436,12
@@
int udevadm_info(struct udev *udev, int argc, char *argv[])
switch(query) {
case QUERY_NAME:
if (root) {
switch(query) {
case QUERY_NAME:
if (root) {
- printf("%s\n", udev_device_get_devn
am
e(device));
+ printf("%s\n", udev_device_get_devn
od
e(device));
} else {
size_t len;
len = strlen(udev_get_dev_path(udev));
} else {
size_t len;
len = strlen(udev_get_dev_path(udev));
- printf("%s\n", &udev_device_get_devn
am
e(device)[len+1]);
+ printf("%s\n", &udev_device_get_devn
od
e(device)[len+1]);
}
break;
case QUERY_SYMLINK:
}
break;
case QUERY_SYMLINK: