chiark / gitweb /
sd-device: fix reading of subsystem
authorTom Gundersen <teg@jklm.no>
Tue, 14 Apr 2015 14:05:53 +0000 (16:05 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 07:05:09 +0000 (08:05 +0100)
src/libelogind/sd-device/sd-device.c

index 7d52e3cc1d0f052f3d92de3fd9d0af7bae57363a..d420bd0425d7e184a6bced2c3132164bbe486cb1 100644 (file)
@@ -772,10 +772,10 @@ _public_ int sd_device_get_subsystem(sd_device *device, const char **ret) {
                         r = device_set_subsystem(device, "drivers");
                 else if (path_startswith(device->devpath, "/subsystem/") ||
                          path_startswith(device->devpath, "/class/") ||
-                         path_startswith(device->devpath, "/buss/"))
+                         path_startswith(device->devpath, "/bus/"))
                         r = device_set_subsystem(device, "subsystem");
                 if (r < 0)
-                        return r;
+                        return log_debug_errno(r, "sd-devcie: could not set subsystem for %s: %m", device->devpath);
 
                 device->subsystem_set = true;
         }