disk - add uuid to udev dict of parts
authorAlex Hornung <ahornung@gmail.com>
Fri, 10 Feb 2012 16:44:28 +0000 (16:44 +0000)
committerAlex Hornung <ahornung@gmail.com>
Fri, 10 Feb 2012 16:44:28 +0000 (16:44 +0000)
 * Add the partition (disklabel64) UUID to the
   udev dictionary of partition disk devices,
   e.g. da0s1a.

sys/kern/subr_disk.c

index 16dfc1d..c0f1b59 100644 (file)
@@ -228,6 +228,7 @@ disk_probe_slice(struct disk *dp, cdev_t dev, int slice, int reprobe)
                                                make_dev_alias(ndev,
                                                    "part-by-uuid/%s",
                                                    uuid_buf);
+                                               udev_dict_set_cstr(ndev, "uuid", uuid_buf);
                                        }
                                } else {
                                        ndev = make_dev_covering(&disk_ops, dp->d_rawdev->si_ops,
@@ -260,6 +261,7 @@ disk_probe_slice(struct disk *dp, cdev_t dev, int slice, int reprobe)
                                                make_dev_alias(ndev,
                                                    "part-by-uuid/%s",
                                                    uuid_buf);
+                                               udev_dict_set_cstr(ndev, "uuid", uuid_buf);
                                        }
                                        ndev->si_flags |= SI_REPROBE_TEST;
                                }