libudev: udev_device_get_devname -> udev_device_get_devnode

This commit is contained in:
Kay Sievers 2008-09-20 00:01:20 -07:00
parent 38f27948cd
commit fb762bb928
5 changed files with 9 additions and 9 deletions

View file

@ -14,7 +14,7 @@ udev_device_unref
udev_device_get_udev udev_device_get_udev
udev_device_get_syspath udev_device_get_syspath
udev_device_get_devpath udev_device_get_devpath
udev_device_get_devname udev_device_get_devnode
udev_device_get_sysname udev_device_get_sysname
udev_device_get_subsystem udev_device_get_subsystem
udev_device_get_devlinks udev_device_get_devlinks

View file

@ -361,7 +361,7 @@ const char *udev_device_get_sysname(struct udev_device *udev_device)
} }
/** /**
* udev_device_get_devname: * udev_device_get_devnode:
* @udev_device: udev device * @udev_device: udev device
* *
* Retrieve the device node file name belonging to the udev device. * Retrieve the device node file name belonging to the udev device.
@ -369,7 +369,7 @@ const char *udev_device_get_sysname(struct udev_device *udev_device)
* *
* Returns: the device node file name of the udev device, or #NULL if no device node exists * Returns: the device node file name of the udev device, or #NULL if no device node exists
**/ **/
const char *udev_device_get_devname(struct udev_device *udev_device) const char *udev_device_get_devnode(struct udev_device *udev_device)
{ {
if (udev_device == NULL) if (udev_device == NULL)
return NULL; return NULL;

View file

@ -54,7 +54,7 @@ extern const char *udev_device_get_devpath(struct udev_device *udev_device);
extern const char *udev_device_get_subsystem(struct udev_device *udev_device); extern const char *udev_device_get_subsystem(struct udev_device *udev_device);
extern const char *udev_device_get_syspath(struct udev_device *udev_device); extern const char *udev_device_get_syspath(struct udev_device *udev_device);
extern const char *udev_device_get_sysname(struct udev_device *udev_device); extern const char *udev_device_get_sysname(struct udev_device *udev_device);
extern const char *udev_device_get_devname(struct udev_device *udev_device); extern const char *udev_device_get_devnode(struct udev_device *udev_device);
extern int udev_device_get_devlinks(struct udev_device *udev_device, extern int udev_device_get_devlinks(struct udev_device *udev_device,
int (*cb)(struct udev_device *udev_device, int (*cb)(struct udev_device *udev_device,
const char *value, void *data), const char *value, void *data),

View file

@ -64,7 +64,7 @@ static void print_device(struct udev_device *device)
printf("subsystem: '%s'\n", str); printf("subsystem: '%s'\n", str);
str = udev_device_get_driver(device); str = udev_device_get_driver(device);
printf("driver: '%s'\n", str); printf("driver: '%s'\n", str);
str = udev_device_get_devname(device); str = udev_device_get_devnode(device);
printf("devname: '%s'\n", str); printf("devname: '%s'\n", str);
count = udev_device_get_devlinks(device, print_devlinks_cb, NULL); count = udev_device_get_devlinks(device, print_devlinks_cb, NULL);
printf("found %i links\n", count); printf("found %i links\n", count);

View file

@ -148,7 +148,7 @@ static void print_record(struct udev_device *device)
printf("P: %s\n", udev_device_get_devpath(device)); printf("P: %s\n", udev_device_get_devpath(device));
len = strlen(udev_get_dev_path(udev_device_get_udev(device))); len = strlen(udev_get_dev_path(udev_device_get_udev(device)));
printf("N: %s\n", &udev_device_get_devname(device)[len+1]); printf("N: %s\n", &udev_device_get_devnode(device)[len+1]);
i = device_get_devlink_priority(device); i = device_get_devlink_priority(device);
if (i != 0) if (i != 0)
printf("L: %i\n", i); printf("L: %i\n", i);
@ -165,7 +165,7 @@ static void print_record(struct udev_device *device)
static int export_all_cb(struct udev_device *device, void *data) static int export_all_cb(struct udev_device *device, void *data)
{ {
if (udev_device_get_devname(device) != NULL) if (udev_device_get_devnode(device) != NULL)
print_record(device); print_record(device);
return 0; return 0;
} }
@ -436,12 +436,12 @@ int udevadm_info(struct udev *udev, int argc, char *argv[])
switch(query) { switch(query) {
case QUERY_NAME: case QUERY_NAME:
if (root) { if (root) {
printf("%s\n", udev_device_get_devname(device)); printf("%s\n", udev_device_get_devnode(device));
} else { } else {
size_t len; size_t len;
len = strlen(udev_get_dev_path(udev)); len = strlen(udev_get_dev_path(udev));
printf("%s\n", &udev_device_get_devname(device)[len+1]); printf("%s\n", &udev_device_get_devnode(device)[len+1]);
} }
break; break;
case QUERY_SYMLINK: case QUERY_SYMLINK: