node_device_udev: Inline udevRemoveOneDevice

Inline `udevRemoveOneDevice` as it's used only once.

Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
This commit is contained in:
Marc Hartmayer 2024-04-23 20:08:56 +02:00 committed by Jonathon Jongsma
parent e6b70ae0c3
commit d7c8908be8

View File

@ -1485,16 +1485,6 @@ udevRemoveOneDeviceSysPath(const char *path)
return 0;
}
static int
udevRemoveOneDevice(struct udev_device *device)
{
const char *path = udev_device_get_syspath(device);
return udevRemoveOneDeviceSysPath(path);
}
static int
udevSetParent(struct udev_device *device,
virNodeDeviceDef *def)
@ -1778,8 +1768,11 @@ udevHandleOneDevice(struct udev_device *device)
if (STREQ(action, "add") || STREQ(action, "change"))
return udevAddOneDevice(device);
if (STREQ(action, "remove"))
return udevRemoveOneDevice(device);
if (STREQ(action, "remove")) {
const char *path = udev_device_get_syspath(device);
return udevRemoveOneDeviceSysPath(path);
}
if (STREQ(action, "move")) {
const char *devpath_old = udevGetDeviceProperty(device, "DEVPATH_OLD");