]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libudev/libudev-device.c
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / libudev / libudev-device.c
index c27b01db96ef7921bc17f63d1cf734a131c75b56..82df426491e38a7f2e4ce414b8c1ebb0942d688c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <stdbool.h>
-#include <errno.h>
-#include <string.h>
+#include <ctype.h>
 #include <dirent.h>
+#include <errno.h>
 #include <fcntl.h>
-#include <ctype.h>
+#include <linux/sockios.h>
 #include <net/if.h>
-#include <sys/stat.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
-#include <linux/sockios.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
+#include "libudev.h"
 #include "sd-device.h"
-#include "device-util.h"
-#include "device-private.h"
 
-#include "libudev.h"
-#include "libudev-private.h"
+#include "alloc-util.h"
+#include "device-private.h"
+#include "device-util.h"
 #include "libudev-device-internal.h"
+#include "libudev-private.h"
+#include "parse-util.h"
 
 /**
  * SECTION:libudev-device
@@ -493,7 +496,7 @@ _public_ struct udev_device *udev_device_get_parent_with_subsystem_devtype(struc
                 return NULL;
         }
 
-        /* then walk the chain of udev_device parents until the correspanding
+        /* then walk the chain of udev_device parents until the corresponding
            one is found */
         while ((udev_device = udev_device_get_parent(udev_device))) {
                 if (udev_device->device == parent)
@@ -617,7 +620,7 @@ _public_ const char *udev_device_get_syspath(struct udev_device *udev_device)
  *
  * Get the kernel device name in /sys.
  *
- * Returns: the name string of the device device
+ * Returns: the name string of the device
  **/
 _public_ const char *udev_device_get_sysname(struct udev_device *udev_device)
 {
@@ -871,7 +874,7 @@ _public_ struct udev_list_entry *udev_device_get_sysattr_list_entry(struct udev_
                 udev_list_cleanup(&udev_device->sysattrs);
 
                 FOREACH_DEVICE_SYSATTR(udev_device->device, sysattr)
-                        udev_list_entry_add(&udev_device->properties, sysattr, NULL);
+                        udev_list_entry_add(&udev_device->sysattrs, sysattr, NULL);
 
                 udev_device->sysattrs_read = true;
         }