config/udev: Prefix and shift "removing GPU" message
The message "removing GPU device ..." appeared even if the removal was skipped (when path == NULL). Move it below the path check and make it a LogMessage with config/udev prefix. Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
4b0d0df34f
commit
62a4eeaa25
|
@ -300,12 +300,11 @@ device_removed(struct udev_device *device)
|
|||
const char *path = udev_device_get_devnode(device);
|
||||
dev_t devnum = udev_device_get_devnum(device);
|
||||
|
||||
if (strncmp(sysname,"card", 4) != 0)
|
||||
return;
|
||||
ErrorF("removing GPU device %s %s\n", syspath, path);
|
||||
if (!path)
|
||||
if ((strncmp(sysname,"card", 4) != 0) || (path == NULL))
|
||||
return;
|
||||
|
||||
LogMessage(X_INFO, "config/udev: removing GPU device %s %s\n",
|
||||
syspath, path);
|
||||
config_udev_odev_setup_attribs(path, syspath, major(devnum),
|
||||
minor(devnum), DeleteGPUDeviceRequest);
|
||||
/* Retry vtenter after a drm node removal */
|
||||
|
|
Loading…
Reference in New Issue