git: kernel - Add /dev/part-by-label

Matthew Dillon dillon at
Wed Feb 27 22:46:41 PST 2019

commit 46acecf8d0ddcae9f9536491351dcaa37ddb056c
Author: Matthew Dillon <dillon at>
Date:   Wed Feb 27 22:36:27 2019 -0800

    kernel - Add /dev/part-by-label
    * The DragonFly disklabel has a 'label' field which accepts up to
      a 63 byte ascii label.
    * When this field is not empty, the kernel will now create a
      "/dev/part-by-label/<label>.<part>" alias.
      For example, if the label is FUBAR and you create a label with
      partitions 'a', 'b', and 'd', then you will get:
      # ls /dev/part-by-label
      FUBAR.a      FUBAR.b      FUBAR.d
    * WARNING!  Duplicate labels will replace each other, so the
      label that shows up will be non-deterministic.
    Suggested-by: Aaron LI

Summary of changes:
 sys/kern/subr_disk.c        | 24 +++++++++++++++++++++++-
 sys/kern/subr_disklabel32.c | 19 +++++++++++++++++++
 sys/kern/subr_disklabel64.c | 19 +++++++++++++++++++
 sys/sys/disklabel.h         |  4 ++++
 4 files changed, 65 insertions(+), 1 deletion(-)

DragonFly BSD source repository

More information about the Commits mailing list