chiark / gitweb /
udev-builtin-blkid: export ID_PART_TABLE_UUID
[elogind.git] / src / udev / udev-builtin-blkid.c
index 39f286a745977a404efaf4e827ad4937c43b63b3..b48dccc2fb11af275e127e73344e3131ba5fd183 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * probe disks for filesystems and partitions
  *
 /*
  * probe disks for filesystems and partitions
  *
- * Copyright (C) 2011 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2011 Kay Sievers <kay@vrfy.org>
  * Copyright (C) 2011 Karel Zak <kzak@redhat.com>
  *
  * This program is free software: you can redistribute it and/or modify
  * Copyright (C) 2011 Karel Zak <kzak@redhat.com>
  *
  * This program is free software: you can redistribute it and/or modify
@@ -67,6 +67,9 @@ static void print_property(struct udev_device *dev, bool test, const char *name,
         } else if (streq(name, "PTTYPE")) {
                 udev_builtin_add_property(dev, test, "ID_PART_TABLE_TYPE", value);
 
         } else if (streq(name, "PTTYPE")) {
                 udev_builtin_add_property(dev, test, "ID_PART_TABLE_TYPE", value);
 
+        } else if (streq(name, "PTUUID")) {
+                udev_builtin_add_property(dev, test, "ID_PART_TABLE_UUID", value);
+
         } else if (streq(name, "PART_ENTRY_NAME")) {
                 blkid_encode_string(value, s, sizeof(s));
                 udev_builtin_add_property(dev, test, "ID_PART_ENTRY_NAME", s);
         } else if (streq(name, "PART_ENTRY_NAME")) {
                 blkid_encode_string(value, s, sizeof(s));
                 udev_builtin_add_property(dev, test, "ID_PART_ENTRY_NAME", s);
@@ -76,8 +79,24 @@ static void print_property(struct udev_device *dev, bool test, const char *name,
                 udev_builtin_add_property(dev, test, "ID_PART_ENTRY_TYPE", s);
 
         } else if (startswith(name, "PART_ENTRY_")) {
                 udev_builtin_add_property(dev, test, "ID_PART_ENTRY_TYPE", s);
 
         } else if (startswith(name, "PART_ENTRY_")) {
-                util_strscpyl(s, sizeof(s), "ID_", name, NULL);
+                strscpyl(s, sizeof(s), "ID_", name, NULL);
                 udev_builtin_add_property(dev, test, s, value);
                 udev_builtin_add_property(dev, test, s, value);
+
+        } else if (streq(name, "SYSTEM_ID")) {
+                blkid_encode_string(value, s, sizeof(s));
+                udev_builtin_add_property(dev, test, "ID_FS_SYSTEM_ID", s);
+
+        } else if (streq(name, "PUBLISHER_ID")) {
+                blkid_encode_string(value, s, sizeof(s));
+                udev_builtin_add_property(dev, test, "ID_FS_PUBLISHER_ID", s);
+
+        } else if (streq(name, "APPLICATION_ID")) {
+                blkid_encode_string(value, s, sizeof(s));
+                udev_builtin_add_property(dev, test, "ID_FS_APPLICATION_ID", s);
+
+        } else if (streq(name, "BOOT_SYSTEM_ID")) {
+                blkid_encode_string(value, s, sizeof(s));
+                udev_builtin_add_property(dev, test, "ID_FS_BOOT_SYSTEM_ID", s);
         }
 }
 
         }
 }