commit ffdd90522aacaf19914c673f15e50f52137ada75
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Fri Feb 25 01:09:03 2022 +0100

    mtab: turn part:x:device:y into /dev/ysx
    
    This is needed when using a rumpdisk-based root disk. Otherwise fsck
    does not properly detect when it is mounted.

diff --git a/trans/mtab.c b/trans/mtab.c
index f21377b7..caff3385 100644
--- a/trans/mtab.c
+++ b/trans/mtab.c
@@ -562,8 +562,24 @@ looks_like_block_device (const char *s)
 error_t
 map_device_to_path (const char *device, char **path)
 {
+  int part = -1;
+  if (strncmp (device, "part:", 5) == 0)
+    {
+      const char *next = strchr(device + 5, ':');
+
+      if (next)
+	{
+	  part = atoi(device + 5);
+	  device = next + 1;
+	}
+    }
   if (strncmp (device, "device:", 7) == 0)
-    asprintf (path, "/dev/%s", &device[7]);
+    {
+      if (part >= 0)
+	asprintf (path, "/dev/%ss%u", &device[7], part);
+      else
+	asprintf (path, "/dev/%s", &device[7]);
+    }
   else if (strncmp (device, "/dev/", 5) == 0)
     *path = strdup (device);
   else if (looks_like_block_device (device))
