chiark / gitweb /
shared/util: add fstab support for partuuid/partlabel
authorDave Reisner <dreisner@archlinux.org>
Sat, 11 Aug 2012 17:32:29 +0000 (13:32 -0400)
committerDave Reisner <dreisner@archlinux.org>
Tue, 21 Aug 2012 15:48:26 +0000 (11:48 -0400)
udev has supported this since 172, so it should be a safe (and welcome)
addition for users of GPT partitioned disks.

src/shared/util.c

index d94bc695c8294dce8fef4ab4bb69c190255c6959..55e344f54dc39ab0c0a6c22b55bedf2c04561d16 100644 (file)
@@ -4159,6 +4159,12 @@ char *fstab_node_to_udev_node(const char *p) {
         if (startswith(p, "UUID="))
                 return tag_to_udev_node(p+5, "uuid");
 
+        if (startswith(p, "PARTUUID="))
+                return tag_to_udev_node(p+9, "partuuid");
+
+        if (startswith(p, "PARTLABEL="))
+                return tag_to_udev_node(p+10, "partlabel");
+
         return strdup(p);
 }