[PATCH 1/8] config/udev: Prefix and shift "removing GPU" message

Daniel Martin daniel.martin at secunet.com
Fri Nov 28 02:20:46 PST 2014


From: Daniel Martin <consume.noise at gmail.com>

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 at gmail.com>
---
 config/udev.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/config/udev.c b/config/udev.c
index 1e4a9d7..1d2140a 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 */
-- 
2.1.3



More information about the xorg-devel mailing list