vkd(4) - Announce virtual disks upon initialization.
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Wed, 20 Feb 2013 11:09:26 +0000 (12:09 +0100)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Fri, 22 Feb 2013 01:11:07 +0000 (02:11 +0100)
sys/dev/virtual/vkernel/disk/vdisk.c

index 941e358..f3066b3 100644 (file)
@@ -141,6 +141,13 @@ vkdinit(void *dummy __unused)
                        strlcpy(info.d_serialno, dsk->serno, SERNOLEN);
                }
                disk_setdiskinfo(&sc->disk, &info);
+
+               /* Announce disk details */
+               kprintf("vkd%d: <Virtual disk> ", i);
+               if (info.d_serialno)
+                       kprintf("Serial Number %s", info.d_serialno);
+               kprintf("\nvkd%d: %dMB (%ju %d byte sectors)\n",
+                   i, (int)(st.st_size / 1024 / 1024), info.d_media_blocks, info.d_media_blksize);
        }
 }