summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--namedev.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/namedev.c b/namedev.c
index 391da7efca..d183a36329 100644
--- a/namedev.c
+++ b/namedev.c
@@ -527,6 +527,15 @@ static void apply_format(struct udevice *udev, unsigned char *string)
strcat(pos, udev->kernel_number);
dbg("substitute kernel number '%s'", udev->kernel_number);
break;
+ case 'D':
+ if (strlen(udev->kernel_number) == 0) {
+ strcat(pos, "disk");
+ break;
+ }
+ strcat(pos, "part");
+ strcat(pos, udev->kernel_number);
+ dbg("substitute kernel number '%s'", udev->kernel_number);
+ break;
case 'm':
sprintf(pos, "%u", udev->minor);
dbg("substitute minor number '%u'", udev->minor);