Page MenuHomeFreeBSD

D36270.id109967.diff
No OneTemporary

D36270.id109967.diff

diff --git a/usr.sbin/bhyve/pci_virtio_scsi.c b/usr.sbin/bhyve/pci_virtio_scsi.c
--- a/usr.sbin/bhyve/pci_virtio_scsi.c
+++ b/usr.sbin/bhyve/pci_virtio_scsi.c
@@ -88,8 +88,8 @@
#define VIRTIO_SCSI_F_CHANGE (1 << 2)
static int pci_vtscsi_debug = 0;
-#define DPRINTF(params) if (pci_vtscsi_debug) PRINTLN params
-#define WPRINTF(params) PRINTLN params
+#define WPRINTF(msg, params...) PRINTLN("virtio-scsi: " msg, ##params)
+#define DPRINTF(msg, params...) if (pci_vtscsi_debug) WPRINTF(msg, ##params)
struct pci_vtscsi_config {
uint32_t num_queues;
@@ -289,8 +289,7 @@
vq_endchains(q->vsq_vq, 0);
pthread_mutex_unlock(&q->vsq_qmtx);
- DPRINTF(("virtio-scsi: request <idx=%d> completed",
- req->vsr_idx));
+ DPRINTF("request <idx=%d> completed", req->vsr_idx);
free(req);
}
@@ -305,7 +304,7 @@
sc = vsc;
- DPRINTF(("vtscsi: device reset requested"));
+ DPRINTF("device reset requested");
vi_reset_dev(&sc->vss_vs);
/* initialize config structure */
@@ -434,13 +433,13 @@
struct sbuf *sb = sbuf_new_auto();
ctl_io_sbuf(io, sb);
sbuf_finish(sb);
- DPRINTF(("pci_virtio_scsi: %s", sbuf_data(sb)));
+ DPRINTF("%s", sbuf_data(sb));
sbuf_delete(sb);
}
err = ioctl(sc->vss_ctl_fd, CTL_IO, io);
if (err != 0)
- WPRINTF(("CTL_IO: err=%d (%s)", errno, strerror(errno)));
+ WPRINTF("CTL_IO: err=%d (%s)", errno, strerror(errno));
tmf->response = io->taskio.task_status;
ctl_scsi_free_io(io);
@@ -527,13 +526,13 @@
struct sbuf *sb = sbuf_new_auto();
ctl_io_sbuf(io, sb);
sbuf_finish(sb);
- DPRINTF(("pci_virtio_scsi: %s", sbuf_data(sb)));
+ DPRINTF("%s", sbuf_data(sb));
sbuf_delete(sb);
}
err = ioctl(sc->vss_ctl_fd, CTL_IO, io);
if (err != 0) {
- WPRINTF(("CTL_IO: err=%d (%s)", errno, strerror(errno)));
+ WPRINTF("CTL_IO: err=%d (%s)", errno, strerror(errno));
cmd_wr->response = VIRTIO_SCSI_S_FAILURE;
} else {
cmd_wr->sense_len = MIN(io->scsiio.sense_len,
@@ -622,8 +621,7 @@
pthread_cond_signal(&q->vsq_cv);
pthread_mutex_unlock(&q->vsq_mtx);
- DPRINTF(("virtio-scsi: request <idx=%d> enqueued",
- vireq.idx));
+ DPRINTF("request <idx=%d> enqueued", vireq.idx);
}
}
@@ -695,7 +693,7 @@
devname = "/dev/cam/ctl";
sc->vss_ctl_fd = open(devname, O_RDWR);
if (sc->vss_ctl_fd < 0) {
- WPRINTF(("cannot open %s: %s", devname, strerror(errno)));
+ WPRINTF("cannot open %s: %s", devname, strerror(errno));
free(sc);
return (1);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Feb 1, 5:40 AM (20 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16376511
Default Alt Text
D36270.id109967.diff (2 KB)

Event Timeline