Index: usr.sbin/bhyve/block_if.c =================================================================== --- usr.sbin/bhyve/block_if.c +++ usr.sbin/bhyve/block_if.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -447,12 +448,12 @@ } if (fd < 0) { - perror("Could not open backing file"); + warn("Could not open backing file: %s", nopt); goto err; } if (fstat(fd, &sbuf) < 0) { - perror("Could not stat backing file"); + warn("Could not stat backing file %s", nopt); goto err; } Index: usr.sbin/bhyve/pci_virtio_block.c =================================================================== --- usr.sbin/bhyve/pci_virtio_block.c +++ usr.sbin/bhyve/pci_virtio_block.c @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -308,7 +309,7 @@ snprintf(bident, sizeof(bident), "%d:%d", pi->pi_slot, pi->pi_func); bctxt = blockif_open(opts, bident); if (bctxt == NULL) { - perror("Could not open backing file"); + warn("Could not open backing file %s", opts); return (1); }