summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Martin <consume.noise@gmail.com>2014-11-28 11:20:46 +0100
committerKeith Packard <keithp@keithp.com>2014-12-08 15:49:22 -0800
commit62a4eeaa25099872682d6c2f9f13a0e73fc5ce1e (patch)
tree612b863dafa3024fda287abb97d867ece309f607
parent4b0d0df34f10a88c10cb23dd50087b59f5c4fece (diff)
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>
-rw-r--r--config/udev.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/config/udev.c b/config/udev.c
index 1e4a9d7a6..1d2140afd 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -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 */