Page MenuHomeFreeBSD

D22552.diff
No OneTemporary

D22552.diff

Index: head/usr.sbin/bhyve/audio.c
===================================================================
--- head/usr.sbin/bhyve/audio.c
+++ head/usr.sbin/bhyve/audio.c
@@ -92,7 +92,7 @@
if (strlen(dev_name) < sizeof(aud->dev_name))
memcpy(aud->dev_name, dev_name, strlen(dev_name) + 1);
else {
- DPRINTF("dev_name too big\n");
+ DPRINTF("dev_name too big\n\r");
free(aud);
return NULL;
}
@@ -101,7 +101,7 @@
aud->fd = open(aud->dev_name, aud->dir ? O_WRONLY : O_RDONLY, 0);
if (aud->fd == -1) {
- DPRINTF("Failed to open dev: %s, errno: %d\n",
+ DPRINTF("Failed to open dev: %s, errno: %d\n\r",
aud->dev_name, errno);
free(aud);
return (NULL);
@@ -137,7 +137,7 @@
assert(params);
if ((audio_fd = aud->fd) < 0) {
- DPRINTF("Incorrect audio device descriptor for %s\n",
+ DPRINTF("Incorrect audio device descriptor for %s\n\r",
aud->dev_name);
return (-1);
}
@@ -146,7 +146,7 @@
if (aud->inited) {
err = ioctl(audio_fd, SNDCTL_DSP_RESET, NULL);
if (err == -1) {
- DPRINTF("Failed to reset fd: %d, errno: %d\n",
+ DPRINTF("Failed to reset fd: %d, errno: %d\n\r",
aud->fd, errno);
return (-1);
}
@@ -157,14 +157,14 @@
format = params->format;
err = ioctl(audio_fd, SNDCTL_DSP_SETFMT, &format);
if (err == -1) {
- DPRINTF("Fail to set fmt: 0x%x errno: %d\n",
+ DPRINTF("Fail to set fmt: 0x%x errno: %d\n\r",
params->format, errno);
return -1;
}
/* The device does not support the requested audio format */
if (format != params->format) {
- DPRINTF("Mismatch format: 0x%x params->format: 0x%x\n",
+ DPRINTF("Mismatch format: 0x%x params->format: 0x%x\n\r",
format, params->format);
return -1;
}
@@ -173,14 +173,14 @@
channels = params->channels;
err = ioctl(audio_fd, SNDCTL_DSP_CHANNELS, &channels);
if (err == -1) {
- DPRINTF("Fail to set channels: %d errno: %d\n",
+ DPRINTF("Fail to set channels: %d errno: %d\n\r",
params->channels, errno);
return -1;
}
/* The device does not support the requested no. of channels */
if (channels != params->channels) {
- DPRINTF("Mismatch channels: %d params->channels: %d\n",
+ DPRINTF("Mismatch channels: %d params->channels: %d\n\r",
channels, params->channels);
return -1;
}
@@ -189,14 +189,14 @@
rate = params->rate;
err = ioctl(audio_fd, SNDCTL_DSP_SPEED, &rate);
if (err == -1) {
- DPRINTF("Fail to set speed: %d errno: %d\n",
+ DPRINTF("Fail to set speed: %d errno: %d\n\r",
params->rate, errno);
return -1;
}
/* The device does not support the requested rate / speed */
if (rate != params->rate) {
- DPRINTF("Mismatch rate: %d params->rate: %d\n",
+ DPRINTF("Mismatch rate: %d params->rate: %d\n\r",
rate, params->rate);
return -1;
}
@@ -205,10 +205,10 @@
err = ioctl(audio_fd, aud->dir ? SNDCTL_DSP_GETOSPACE :
SNDCTL_DSP_GETISPACE, &info);
if (err == -1) {
- DPRINTF("Fail to get audio buf info errno: %d\n", errno);
+ DPRINTF("Fail to get audio buf info errno: %d\n\r", errno);
return -1;
}
- DPRINTF("fragstotal: 0x%x fragsize: 0x%x\n",
+ DPRINTF("fragstotal: 0x%x fragsize: 0x%x\n\r",
info.fragstotal, info.fragsize);
#endif
return 0;
@@ -237,7 +237,7 @@
while (total < count) {
len = write(audio_fd, buf + total, count - total);
if (len == -1) {
- DPRINTF("Fail to write to fd: %d, errno: %d\n",
+ DPRINTF("Fail to write to fd: %d, errno: %d\n\r",
audio_fd, errno);
return -1;
}
@@ -273,7 +273,7 @@
while (total < count) {
len = read(audio_fd, buf + total, count - total);
if (len == -1) {
- DPRINTF("Fail to write to fd: %d, errno: %d\n",
+ DPRINTF("Fail to write to fd: %d, errno: %d\n\r",
audio_fd, errno);
return -1;
}
Index: head/usr.sbin/bhyve/hda_codec.c
===================================================================
--- head/usr.sbin/bhyve/hda_codec.c
+++ head/usr.sbin/bhyve/hda_codec.c
@@ -400,7 +400,7 @@
if (!(play || rec))
return (-1);
- DPRINTF("cad: 0x%x opts: %s\n", hci->cad, opts);
+ DPRINTF("cad: 0x%x opts: %s\n\r", hci->cad, opts);
sc = calloc(1, sizeof(*sc));
if (!sc)
@@ -420,7 +420,7 @@
sc->conf_default = hda_codec_conf_default;
sc->pin_ctrl_default = hda_codec_pin_ctrl_default;
sc->verb_handlers = hda_codec_verb_handlers;
- DPRINTF("HDA Codec nodes: %d\n", sc->no_nodes);
+ DPRINTF("HDA Codec nodes: %d\n\r", sc->no_nodes);
/*
* Initialize the Audio Output stream
@@ -435,7 +435,7 @@
st->aud = audio_init(play, 1);
if (!st->aud) {
- DPRINTF("Fail to init the output audio player\n");
+ DPRINTF("Fail to init the output audio player\n\r");
return (-1);
}
}
@@ -453,7 +453,7 @@
st->aud = audio_init(rec, 0);
if (!st->aud) {
- DPRINTF("Fail to init the input audio player\n");
+ DPRINTF("Fail to init the input audio player\n\r");
return (-1);
}
}
@@ -488,11 +488,11 @@
st->right_mute = HDA_CODEC_SET_AMP_GAIN_MUTE_MUTE;
}
- DPRINTF("cad: 0x%x\n", hci->cad);
+ DPRINTF("cad: 0x%x\n\r", hci->cad);
if (!hops->signal) {
DPRINTF("The controller ops does not implement \
- the signal function\n");
+ the signal function\n\r");
return (-1);
}
@@ -538,7 +538,7 @@
if (!hops->response) {
DPRINTF("The controller ops does not implement \
- the response function\n");
+ the response function\n\r");
return (-1);
}
@@ -566,11 +566,11 @@
if (sc->verb_handlers[nid])
res = sc->verb_handlers[nid](sc, verb, payload);
else
- DPRINTF("Unknown VERB: 0x%x\n", verb);
+ DPRINTF("Unknown VERB: 0x%x\n\r", verb);
break;
}
- DPRINTF("cad: 0x%x nid: 0x%x verb: 0x%x payload: 0x%x response: 0x%x\n",
+ DPRINTF("cad: 0x%x nid: 0x%x verb: 0x%x payload: 0x%x response: 0x%x\n\r",
cad, nid, verb, payload, res);
return (hops->response(hci, res, HDA_CODEC_RESPONSE_EX_SOL));
@@ -595,11 +595,11 @@
i = dir ? HDA_CODEC_STREAM_OUTPUT : HDA_CODEC_STREAM_INPUT;
st = &sc->streams[i];
- DPRINTF("run: %d, stream: 0x%x, st->stream: 0x%x dir: %d\n",
+ DPRINTF("run: %d, stream: 0x%x, st->stream: 0x%x dir: %d\n\r",
run, stream, st->stream, dir);
if (stream != st->stream) {
- DPRINTF("Stream not found\n");
+ DPRINTF("Stream not found\n\r");
return (0);
}
@@ -653,7 +653,7 @@
params->format = AFMT_S32_LE;
break;
default:
- DPRINTF("Unknown format bits: 0x%x\n",
+ DPRINTF("Unknown format bits: 0x%x\n\r",
fmt & HDA_CODEC_FMT_BITS_MASK);
return (-1);
}
@@ -719,7 +719,7 @@
if (err)
return (-1);
- DPRINTF("rate: %d, channels: %d, format: 0x%x\n",
+ DPRINTF("rate: %d, channels: %d, format: 0x%x\n\r",
params.rate, params.channels, params.format);
return (audio_set_params(aud, &params));
@@ -778,7 +778,7 @@
if (err)
return (-1);
- DPRINTF("rate: %d, channels: %d, format: 0x%x\n",
+ DPRINTF("rate: %d, channels: %d, format: 0x%x\n\r",
params.rate, params.channels, params.format);
return (audio_set_params(aud, &params));
@@ -792,7 +792,7 @@
uint8_t mute = 0;
uint8_t gain = 0;
- DPRINTF("%s verb: 0x%x, payload, 0x%x\n", st->actx.name, verb, payload);
+ DPRINTF("%s verb: 0x%x, payload, 0x%x\n\r", st->actx.name, verb, payload);
switch (verb) {
case HDA_CMD_VERB_GET_CONV_FMT:
@@ -804,10 +804,10 @@
case HDA_CMD_VERB_GET_AMP_GAIN_MUTE:
if (payload & HDA_CMD_GET_AMP_GAIN_MUTE_LEFT) {
res = st->left_gain | st->left_mute;
- DPRINTF("GET_AMP_GAIN_MUTE_LEFT: 0x%x\n", res);
+ DPRINTF("GET_AMP_GAIN_MUTE_LEFT: 0x%x\n\r", res);
} else {
res = st->right_gain | st->right_mute;
- DPRINTF("GET_AMP_GAIN_MUTE_RIGHT: 0x%x\n", res);
+ DPRINTF("GET_AMP_GAIN_MUTE_RIGHT: 0x%x\n\r", res);
}
break;
case HDA_CMD_VERB_SET_AMP_GAIN_MUTE:
@@ -818,14 +818,14 @@
st->left_mute = mute;
st->left_gain = gain;
DPRINTF("SET_AMP_GAIN_MUTE_LEFT: \
- mute: 0x%x gain: 0x%x\n", mute, gain);
+ mute: 0x%x gain: 0x%x\n\r", mute, gain);
}
if (payload & HDA_CMD_SET_AMP_GAIN_MUTE_RIGHT) {
st->right_mute = mute;
st->right_gain = gain;
DPRINTF("SET_AMP_GAIN_MUTE_RIGHT: \
- mute: 0x%x gain: 0x%x\n", mute, gain);
+ mute: 0x%x gain: 0x%x\n\r", mute, gain);
}
break;
case HDA_CMD_VERB_GET_CONV_STREAM_CHAN:
@@ -834,13 +834,13 @@
case HDA_CMD_VERB_SET_CONV_STREAM_CHAN:
st->channel = payload & 0x0f;
st->stream = (payload >> 4) & 0x0f;
- DPRINTF("st->channel: 0x%x st->stream: 0x%x\n",
+ DPRINTF("st->channel: 0x%x st->stream: 0x%x\n\r",
st->channel, st->stream);
if (!st->stream)
hda_audio_ctxt_stop(&st->actx);
break;
default:
- DPRINTF("Unknown VERB: 0x%x\n", verb);
+ DPRINTF("Unknown VERB: 0x%x\n\r", verb);
break;
}
@@ -867,7 +867,7 @@
{
struct hda_audio_ctxt *actx = arg;
- DPRINTF("Start Thread: %s\n", actx->name);
+ DPRINTF("Start Thread: %s\n\r", actx->name);
pthread_mutex_lock(&actx->mtx);
while (1) {
Index: head/usr.sbin/bhyve/net_backends.c
===================================================================
--- head/usr.sbin/bhyve/net_backends.c
+++ head/usr.sbin/bhyve/net_backends.c
@@ -192,7 +192,7 @@
#endif
if (cb == NULL) {
- WPRINTF(("TAP backend requires non-NULL callback\n"));
+ WPRINTF(("TAP backend requires non-NULL callback\n\r"));
return (-1);
}
@@ -201,7 +201,7 @@
be->fd = open(tbuf, O_RDWR);
if (be->fd == -1) {
- WPRINTF(("open of tap device %s failed\n", tbuf));
+ WPRINTF(("open of tap device %s failed\n\r", tbuf));
goto error;
}
@@ -210,7 +210,7 @@
* notifications with the event loop
*/
if (ioctl(be->fd, FIONBIO, &opt) < 0) {
- WPRINTF(("tap device O_NONBLOCK failed\n"));
+ WPRINTF(("tap device O_NONBLOCK failed\n\r"));
goto error;
}
@@ -222,7 +222,7 @@
priv->mevp = mevent_add_disabled(be->fd, EVF_READ, cb, param);
if (priv->mevp == NULL) {
- WPRINTF(("Could not register event\n"));
+ WPRINTF(("Could not register event\n\r"));
goto error;
}
@@ -363,7 +363,7 @@
req.nr_arg1 = vnet_hdr_len;
err = ioctl(be->fd, NIOCREGIF, &req);
if (err) {
- WPRINTF(("Unable to set vnet header length %d\n",
+ WPRINTF(("Unable to set vnet header length %d\n\r",
vnet_hdr_len));
return (err);
}
@@ -420,7 +420,7 @@
priv->nmd = nm_open(priv->ifname, NULL, NETMAP_NO_TX_POLL, NULL);
if (priv->nmd == NULL) {
- WPRINTF(("Unable to nm_open(): interface '%s', errno (%s)\n",
+ WPRINTF(("Unable to nm_open(): interface '%s', errno (%s)\n\r",
devname, strerror(errno)));
free(priv);
return (-1);
@@ -435,7 +435,7 @@
priv->mevp = mevent_add_disabled(be->fd, EVF_READ, cb, param);
if (priv->mevp == NULL) {
- WPRINTF(("Could not register event\n"));
+ WPRINTF(("Could not register event\n\r"));
return (-1);
}
@@ -472,7 +472,7 @@
ring = priv->tx;
head = ring->head;
if (head == ring->tail) {
- WPRINTF(("No space, drop %zu bytes\n", count_iov(iov, iovcnt)));
+ WPRINTF(("No space, drop %zu bytes\n\r", count_iov(iov, iovcnt)));
goto txsync;
}
nm_buf = NETMAP_BUF(ring, ring->slot[head].buf_idx);
@@ -513,7 +513,7 @@
* We ran out of netmap slots while
* splitting the iovec fragments.
*/
- WPRINTF(("No space, drop %zu bytes\n",
+ WPRINTF(("No space, drop %zu bytes\n\r",
count_iov(iov, iovcnt)));
goto txsync;
}
@@ -585,7 +585,7 @@
iovcnt--;
if (iovcnt == 0) {
/* No space to receive. */
- WPRINTF(("Short iov, drop %zd bytes\n",
+ WPRINTF(("Short iov, drop %zd bytes\n\r",
totlen));
return (-ENOSPC);
}
Index: head/usr.sbin/bhyve/pci_ahci.c
===================================================================
--- head/usr.sbin/bhyve/pci_ahci.c
+++ head/usr.sbin/bhyve/pci_ahci.c
@@ -240,7 +240,7 @@
if (p->is & p->ie)
sc->is |= (1 << i);
}
- DPRINTF("%s(%08x) %08x\n", __func__, mask, sc->is);
+ DPRINTF("%s(%08x) %08x\n\r", __func__, mask, sc->is);
/* If there is nothing enabled -- clear legacy interrupt and exit. */
if (sc->is == 0 || (sc->ghc & AHCI_GHC_IE) == 0) {
@@ -282,7 +282,7 @@
struct pci_devinst *pi = sc->asc_pi;
int nmsg;
- DPRINTF("%s(%d) %08x/%08x %08x\n", __func__,
+ DPRINTF("%s(%d) %08x/%08x %08x\n\r", __func__,
p->port, p->is, p->ie, sc->is);
/* If there is nothing enabled -- we are done. */
@@ -341,7 +341,7 @@
irq = (fis[1] & (1 << 6)) ? AHCI_P_IX_PS : 0;
break;
default:
- WPRINTF("unsupported fis type %d\n", ft);
+ WPRINTF("unsupported fis type %d\n\r", ft);
return;
}
if (fis[2] & ATA_S_ERROR) {
@@ -1601,7 +1601,7 @@
DPRINTF("ACMD:");
for (i = 0; i < 16; i++)
DPRINTF("%02x ", acmd[i]);
- DPRINTF("\n");
+ DPRINTF("\n\r");
}
#endif
@@ -1788,7 +1788,7 @@
handle_packet_cmd(p, slot, cfis);
break;
default:
- WPRINTF("Unsupported cmd:%02x\n", cfis[2]);
+ WPRINTF("Unsupported cmd:%02x\n\r", cfis[2]);
ahci_write_fis_d2h(p, slot, cfis,
(ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR);
break;
@@ -1818,22 +1818,22 @@
#ifdef AHCI_DEBUG
prdt = (struct ahci_prdt_entry *)(cfis + 0x80);
- DPRINTF("\ncfis:");
+ DPRINTF("\n\rcfis:");
for (i = 0; i < cfl; i++) {
if (i % 10 == 0)
- DPRINTF("\n");
+ DPRINTF("\n\r");
DPRINTF("%02x ", cfis[i]);
}
- DPRINTF("\n");
+ DPRINTF("\n\r");
for (i = 0; i < hdr->prdtl; i++) {
- DPRINTF("%d@%08"PRIx64"\n", prdt->dbc & 0x3fffff, prdt->dba);
+ DPRINTF("%d@%08"PRIx64"\n\r", prdt->dbc & 0x3fffff, prdt->dba);
prdt++;
}
#endif
if (cfis[0] != FIS_TYPE_REGH2D) {
- WPRINTF("Not a H2D FIS:%02x\n", cfis[0]);
+ WPRINTF("Not a H2D FIS:%02x\n\r", cfis[0]);
return;
}
@@ -1889,7 +1889,7 @@
uint8_t *cfis;
int slot, ncq, dsm;
- DPRINTF("%s %d\n", __func__, err);
+ DPRINTF("%s %d\n\r", __func__, err);
ncq = dsm = 0;
aior = br->br_param;
@@ -1949,7 +1949,7 @@
ahci_handle_port(p);
out:
pthread_mutex_unlock(&sc->mtx);
- DPRINTF("%s exit\n", __func__);
+ DPRINTF("%s exit\n\r", __func__);
}
static void
@@ -1963,7 +1963,7 @@
uint32_t tfd;
int slot;
- DPRINTF("%s %d\n", __func__, err);
+ DPRINTF("%s %d\n\r", __func__, err);
aior = br->br_param;
p = aior->io_pr;
@@ -2011,7 +2011,7 @@
ahci_handle_port(p);
out:
pthread_mutex_unlock(&sc->mtx);
- DPRINTF("%s exit\n", __func__);
+ DPRINTF("%s exit\n\r", __func__);
}
static void
@@ -2048,7 +2048,7 @@
offset = (offset - AHCI_OFFSET) % AHCI_STEP;
struct ahci_port *p = &sc->port[port];
- DPRINTF("pci_ahci_port %d: write offset 0x%"PRIx64" value 0x%"PRIx64"\n",
+ DPRINTF("pci_ahci_port %d: write offset 0x%"PRIx64" value 0x%"PRIx64"\n\r",
port, offset, value);
switch (offset) {
@@ -2120,7 +2120,7 @@
case AHCI_P_TFD:
case AHCI_P_SIG:
case AHCI_P_SSTS:
- WPRINTF("pci_ahci_port: read only registers 0x%"PRIx64"\n", offset);
+ WPRINTF("pci_ahci_port: read only registers 0x%"PRIx64"\n\r", offset);
break;
case AHCI_P_SCTL:
p->sctl = value;
@@ -2149,7 +2149,7 @@
static void
pci_ahci_host_write(struct pci_ahci_softc *sc, uint64_t offset, uint64_t value)
{
- DPRINTF("pci_ahci_host: write offset 0x%"PRIx64" value 0x%"PRIx64"\n",
+ DPRINTF("pci_ahci_host: write offset 0x%"PRIx64" value 0x%"PRIx64"\n\r",
offset, value);
switch (offset) {
@@ -2157,7 +2157,7 @@
case AHCI_PI:
case AHCI_VS:
case AHCI_CAP2:
- DPRINTF("pci_ahci_host: read only registers 0x%"PRIx64"\n", offset);
+ DPRINTF("pci_ahci_host: read only registers 0x%"PRIx64"\n\r", offset);
break;
case AHCI_GHC:
if (value & AHCI_GHC_HR) {
@@ -2195,7 +2195,7 @@
else if (offset < AHCI_OFFSET + sc->ports * AHCI_STEP)
pci_ahci_port_write(sc, offset, value);
else
- WPRINTF("pci_ahci: unknown i/o write offset 0x%"PRIx64"\n", offset);
+ WPRINTF("pci_ahci: unknown i/o write offset 0x%"PRIx64"\n\r", offset);
pthread_mutex_unlock(&sc->mtx);
}
@@ -2226,7 +2226,7 @@
value = 0;
break;
}
- DPRINTF("pci_ahci_host: read offset 0x%"PRIx64" value 0x%x\n",
+ DPRINTF("pci_ahci_host: read offset 0x%"PRIx64" value 0x%x\n\r",
offset, value);
return (value);
@@ -2267,7 +2267,7 @@
break;
}
- DPRINTF("pci_ahci_port %d: read offset 0x%"PRIx64" value 0x%x\n",
+ DPRINTF("pci_ahci_port %d: read offset 0x%"PRIx64" value 0x%x\n\r",
port, offset, value);
return value;
@@ -2294,7 +2294,7 @@
value = pci_ahci_port_read(sc, offset);
else {
value = 0;
- WPRINTF("pci_ahci: unknown i/o read offset 0x%"PRIx64"\n",
+ WPRINTF("pci_ahci: unknown i/o read offset 0x%"PRIx64"\n\r",
regoff);
}
value >>= 8 * (regoff & 0x3);
Index: head/usr.sbin/bhyve/pci_e82545.c
===================================================================
--- head/usr.sbin/bhyve/pci_e82545.c
+++ head/usr.sbin/bhyve/pci_e82545.c
@@ -533,7 +533,7 @@
sc->nvm_data = 0;
break;
default:
- DPRINTF("eeprom unknown op: 0x%x\r\r",
+ DPRINTF("eeprom unknown op: 0x%x\r\n",
sc->nvm_opaddr);
/* back to opcode mode */
sc->nvm_opaddr = 0;
@@ -616,7 +616,7 @@
} else if (sc->esc_mevpitr != NULL) {
DPRINTF("ims change: throttled %x, ims %x\r\n", new, sc->esc_IMS);
} else if (!sc->esc_irq_asserted) {
- DPRINTF("ims change: lintr assert %x\n\r", new);
+ DPRINTF("ims change: lintr assert %x\r\n", new);
sc->esc_irq_asserted = 1;
pci_lintr_assert(sc->esc_pi);
if (sc->esc_ITR != 0) {
@@ -649,7 +649,7 @@
e82545_intr_write(struct e82545_softc *sc, uint32_t offset, uint32_t value)
{
- DPRINTF("intr_write: off %x, val %x\n\r", offset, value);
+ DPRINTF("intr_write: off %x, val %x\r\n", offset, value);
switch (offset) {
case E1000_ICR:
@@ -683,7 +683,7 @@
retval = 0;
- DPRINTF("intr_read: off %x\n\r", offset);
+ DPRINTF("intr_read: off %x\r\n", offset);
switch (offset) {
case E1000_ICR:
@@ -717,7 +717,7 @@
sc->esc_CTRL = val & ~E1000_CTRL_RST;
if (val & E1000_CTRL_RST) {
- DPRINTF("e1k: s/w reset, ctl %x\n", val);
+ DPRINTF("e1k: s/w reset, ctl %x\r\n", val);
e82545_reset(sc, 1);
}
/* XXX check for phy reset ? */
@@ -746,7 +746,7 @@
/* Save RCTL after stripping reserved bits 31:27,24,21,14,11:10,0 */
sc->esc_RCTL = val & ~0xF9204c01;
- DPRINTF("rx_ctl - %s RCTL %x, val %x\n",
+ DPRINTF("rx_ctl - %s RCTL %x, val %x\r\n",
on ? "on" : "off", sc->esc_RCTL, val);
/* state change requested */
@@ -873,7 +873,7 @@
}
len = netbe_recv(sc->esc_be, vec, maxpktdesc);
if (len <= 0) {
- DPRINTF("netbe_recv() returned %d\n", len);
+ DPRINTF("netbe_recv() returned %d\r\n", len);
goto done;
}
Index: head/usr.sbin/bhyve/pci_hda.c
===================================================================
--- head/usr.sbin/bhyve/pci_hda.c
+++ head/usr.sbin/bhyve/pci_hda.c
@@ -332,11 +332,11 @@
len = strlen(opts);
if (len >= sizeof(buf)) {
- DPRINTF("Opts too big\n");
+ DPRINTF("Opts too big\n\r");
return (0);
}
- DPRINTF("opts: %s\n", opts);
+ DPRINTF("opts: %s\n\r", opts);
strcpy(buf, opts);
@@ -377,7 +377,7 @@
dbg = fopen("/tmp/bhyve_hda.log", "w+");
#endif
- DPRINTF("opts: %s\n", opts);
+ DPRINTF("opts: %s\n\r", opts);
sc = calloc(1, sizeof(*sc));
if (!sc)
@@ -393,7 +393,7 @@
if (codec) {
p = hda_parse_config(opts, "play=", play);
r = hda_parse_config(opts, "rec=", rec);
- DPRINTF("play: %s rec: %s\n", play, rec);
+ DPRINTF("play: %s rec: %s\n\r", play, rec);
if (p | r) {
err = hda_codec_constructor(sc, codec, p ? \
play : NULL, r ? rec : NULL, NULL);
@@ -489,7 +489,7 @@
sc->codecs[sc->codecs_no++] = hci;
if (!codec->init) {
- DPRINTF("This codec does not implement the init function\n");
+ DPRINTF("This codec does not implement the init function\n\r");
return (-1);
}
@@ -522,13 +522,13 @@
if (!hci)
return (-1);
- DPRINTF("cad: 0x%x verb: 0x%x\n", cad, verb);
+ DPRINTF("cad: 0x%x verb: 0x%x\n\r", cad, verb);
codec = hci->codec;
assert(codec);
if (!codec->command) {
- DPRINTF("This codec does not implement the command function\n");
+ DPRINTF("This codec does not implement the command function\n\r");
return (-1);
}
@@ -592,7 +592,7 @@
uint32_t off = 0;
uint8_t i;
- DPRINTF("Reset the HDA controller registers ...\n");
+ DPRINTF("Reset the HDA controller registers ...\n\r");
memset(sc->regs, 0, sizeof(sc->regs));
@@ -620,7 +620,7 @@
struct hda_stream_desc *st = &sc->streams[stream_ind];
uint32_t off = hda_get_offset_stream(stream_ind);
- DPRINTF("Reset the HDA stream: 0x%x\n", stream_ind);
+ DPRINTF("Reset the HDA stream: 0x%x\n\r", stream_ind);
/* Reset the Stream Descriptor registers */
memset(sc->regs + HDA_STREAM_REGS_BASE + off, 0, HDA_STREAM_REGS_LEN);
@@ -670,11 +670,11 @@
bdl_vaddr = hda_dma_get_vaddr(sc, bdl_paddr,
HDA_BDL_ENTRY_LEN * bdl_cnt);
if (!bdl_vaddr) {
- DPRINTF("Fail to get the guest virtual address\n");
+ DPRINTF("Fail to get the guest virtual address\n\r");
return (-1);
}
- DPRINTF("stream: 0x%x bdl_cnt: 0x%x bdl_paddr: 0x%lx\n",
+ DPRINTF("stream: 0x%x bdl_cnt: 0x%x bdl_paddr: 0x%lx\n\r",
stream_ind, bdl_cnt, bdl_paddr);
st->bdl_cnt = bdl_cnt;
@@ -690,7 +690,7 @@
bdle_paddr = bdle_addrl | (bdle_addrh << 32);
bdle_vaddr = hda_dma_get_vaddr(sc, bdle_paddr, bdle_sz);
if (!bdle_vaddr) {
- DPRINTF("Fail to get the guest virtual address\n");
+ DPRINTF("Fail to get the guest virtual address\n\r");
return (-1);
}
@@ -699,14 +699,14 @@
bdle_desc->len = bdle_sz;
bdle_desc->ioc = bdle->ioc;
- DPRINTF("bdle: 0x%x bdle_sz: 0x%x\n", i, bdle_sz);
+ DPRINTF("bdle: 0x%x bdle_sz: 0x%x\n\r", i, bdle_sz);
}
sdctl = hda_get_reg_by_offset(sc, off + HDAC_SDCTL0);
strm = (sdctl >> 20) & 0x0f;
dir = stream_ind >= HDA_ISS_NO;
- DPRINTF("strm: 0x%x, dir: 0x%x\n", strm, dir);
+ DPRINTF("strm: 0x%x, dir: 0x%x\n\r", strm, dir);
sc->stream_map[dir][strm] = stream_ind;
st->stream = strm;
@@ -730,7 +730,7 @@
uint8_t strm = st->stream;
uint8_t dir = st->dir;
- DPRINTF("stream: 0x%x, strm: 0x%x, dir: 0x%x\n", stream_ind, strm, dir);
+ DPRINTF("stream: 0x%x, strm: 0x%x, dir: 0x%x\n\r", stream_ind, strm, dir);
st->run = 0;
@@ -771,10 +771,10 @@
#if DEBUG_HDA == 1
char *name = p->name;
#endif
- DPRINTF("%s size: %d\n", name, p->size);
- DPRINTF("%s dma_vaddr: %p\n", name, p->dma_vaddr);
- DPRINTF("%s wp: 0x%x\n", name, p->wp);
- DPRINTF("%s rp: 0x%x\n", name, p->rp);
+ DPRINTF("%s size: %d\n\r", name, p->size);
+ DPRINTF("%s dma_vaddr: %p\n\r", name, p->dma_vaddr);
+ DPRINTF("%s wp: 0x%x\n\r", name, p->wp);
+ DPRINTF("%s rp: 0x%x\n\r", name, p->rp);
}
static int
@@ -793,7 +793,7 @@
corb->size = hda_corb_sizes[corbsize];
if (!corb->size) {
- DPRINTF("Invalid corb size\n");
+ DPRINTF("Invalid corb size\n\r");
return (-1);
}
@@ -801,12 +801,12 @@
corbubase = hda_get_reg_by_offset(sc, HDAC_CORBUBASE);
corbpaddr = corblbase | (corbubase << 32);
- DPRINTF("CORB dma_paddr: %p\n", (void *)corbpaddr);
+ DPRINTF("CORB dma_paddr: %p\n\r", (void *)corbpaddr);
corb->dma_vaddr = hda_dma_get_vaddr(sc, corbpaddr,
HDA_CORB_ENTRY_LEN * corb->size);
if (!corb->dma_vaddr) {
- DPRINTF("Fail to get the guest virtual address\n");
+ DPRINTF("Fail to get the guest virtual address\n\r");
return (-1);
}
@@ -864,7 +864,7 @@
rirb->size = hda_rirb_sizes[rirbsize];
if (!rirb->size) {
- DPRINTF("Invalid rirb size\n");
+ DPRINTF("Invalid rirb size\n\r");
return (-1);
}
@@ -872,12 +872,12 @@
rirbubase = hda_get_reg_by_offset(sc, HDAC_RIRBUBASE);
rirbpaddr = rirblbase | (rirbubase << 32);
- DPRINTF("RIRB dma_paddr: %p\n", (void *)rirbpaddr);
+ DPRINTF("RIRB dma_paddr: %p\n\r", (void *)rirbpaddr);
rirb->dma_vaddr = hda_dma_get_vaddr(sc, rirbpaddr,
HDA_RIRB_ENTRY_LEN * rirb->size);
if (!rirb->dma_vaddr) {
- DPRINTF("Fail to get the guest virtual address\n");
+ DPRINTF("Fail to get the guest virtual address\n\r");
return (-1);
}
@@ -1022,18 +1022,18 @@
dpibubase = hda_get_reg_by_offset(sc, HDAC_DPIBUBASE);
dpibpaddr = dpiblbase | (dpibubase << 32);
- DPRINTF("DMA Position In Buffer dma_paddr: %p\n",
+ DPRINTF("DMA Position In Buffer dma_paddr: %p\n\r",
(void *)dpibpaddr);
sc->dma_pib_vaddr = hda_dma_get_vaddr(sc, dpibpaddr,
HDA_DMA_PIB_ENTRY_LEN * HDA_IOSS_NO);
if (!sc->dma_pib_vaddr) {
DPRINTF("Fail to get the guest \
- virtual address\n");
+ virtual address\n\r");
assert(0);
}
} else {
- DPRINTF("DMA Position In Buffer Reset\n");
+ DPRINTF("DMA Position In Buffer Reset\n\r");
sc->dma_pib_vaddr = NULL;
}
}
@@ -1046,7 +1046,7 @@
uint32_t value = hda_get_reg_by_offset(sc, offset);
int err;
- DPRINTF("stream_ind: 0x%x old: 0x%x value: 0x%x\n",
+ DPRINTF("stream_ind: 0x%x old: 0x%x value: 0x%x\n\r",
stream_ind, old, value);
if (value & HDAC_SDCTL_SRST) {
@@ -1094,7 +1094,7 @@
assert(hci);
assert(hci->hda);
- DPRINTF("cad: 0x%x\n", hci->cad);
+ DPRINTF("cad: 0x%x\n\r", hci->cad);
sc = hci->hda;
sdiwake = 1 << hci->cad;
@@ -1164,7 +1164,7 @@
assert(!(count % HDA_DMA_ACCESS_LEN));
if (!stream) {
- DPRINTF("Invalid stream\n");
+ DPRINTF("Invalid stream\n\r");
return (-1);
}
@@ -1180,7 +1180,7 @@
st = &sc->streams[stream_ind];
if (!st->run) {
- DPRINTF("Stream 0x%x stopped\n", stream);
+ DPRINTF("Stream 0x%x stopped\n\r", stream);
return (-1);
}
@@ -1306,7 +1306,7 @@
assert(baridx == 0);
assert(size <= 4);
- DPRINTF("offset: 0x%lx value: 0x%lx\n", offset, value);
+ DPRINTF("offset: 0x%lx value: 0x%lx\n\r", offset, value);
err = hda_write(sc, offset, size, value);
assert(!err);
@@ -1325,7 +1325,7 @@
value = hda_read(sc, offset);
- DPRINTF("offset: 0x%lx value: 0x%lx\n", offset, value);
+ DPRINTF("offset: 0x%lx value: 0x%lx\n\r", offset, value);
return (value);
}
Index: head/usr.sbin/bhyve/pci_nvme.c
===================================================================
--- head/usr.sbin/bhyve/pci_nvme.c
+++ head/usr.sbin/bhyve/pci_nvme.c
@@ -801,28 +801,28 @@
nqr = command->cdw11 & 0xFFFF;
if (nqr == 0xffff) {
- WPRINTF(("%s: Illegal NSQR value %#x\n", __func__, nqr));
+ WPRINTF(("%s: Illegal NSQR value %#x\r\n", __func__, nqr));
pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD);
return (-1);
}
sc->num_squeues = ONE_BASED(nqr);
if (sc->num_squeues > sc->max_queues) {
- DPRINTF(("NSQR=%u is greater than max %u\n", sc->num_squeues,
+ DPRINTF(("NSQR=%u is greater than max %u\r\n", sc->num_squeues,
sc->max_queues));
sc->num_squeues = sc->max_queues;
}
nqr = (command->cdw11 >> 16) & 0xFFFF;
if (nqr == 0xffff) {
- WPRINTF(("%s: Illegal NCQR value %#x\n", __func__, nqr));
+ WPRINTF(("%s: Illegal NCQR value %#x\r\n", __func__, nqr));
pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD);
return (-1);
}
sc->num_cqueues = ONE_BASED(nqr);
if (sc->num_cqueues > sc->max_queues) {
- DPRINTF(("NCQR=%u is greater than max %u\n", sc->num_cqueues,
+ DPRINTF(("NCQR=%u is greater than max %u\r\n", sc->num_cqueues,
sc->max_queues));
sc->num_cqueues = sc->max_queues;
}
@@ -1907,7 +1907,7 @@
sc->nvstore.type = NVME_STOR_BLOCKIF;
sc->nvstore.size = blockif_size(sc->nvstore.ctx);
} else {
- fprintf(stderr, "Invalid option %s\n", xopts);
+ fprintf(stderr, "Invalid option %s\r\n", xopts);
free(uopt);
return (-1);
}
@@ -1917,7 +1917,7 @@
free(uopt);
if (sc->nvstore.ctx == NULL || sc->nvstore.size == 0) {
- fprintf(stderr, "backing store not specified\n");
+ fprintf(stderr, "backing store not specified\r\n");
return (-1);
}
if (sectsz == 512 || sectsz == 4096 || sectsz == 8192)
@@ -1932,11 +1932,11 @@
sc->max_queues = NVME_QUEUES;
if (sc->max_qentries <= 0) {
- fprintf(stderr, "Invalid qsz option\n");
+ fprintf(stderr, "Invalid qsz option\r\n");
return (-1);
}
if (sc->ioslots <= 0) {
- fprintf(stderr, "Invalid ioslots option\n");
+ fprintf(stderr, "Invalid ioslots option\r\n");
return (-1);
}
Index: head/usr.sbin/bhyve/pci_virtio_block.c
===================================================================
--- head/usr.sbin/bhyve/pci_virtio_block.c
+++ head/usr.sbin/bhyve/pci_virtio_block.c
@@ -168,7 +168,7 @@
{
struct pci_vtblk_softc *sc = vsc;
- DPRINTF(("vtblk: device reset requested !\n"));
+ DPRINTF(("vtblk: device reset requested !\n\r"));
vi_reset_dev(&sc->vbsc_vs);
}
@@ -303,7 +303,7 @@
int i, sectsz, sts, sto;
if (opts == NULL) {
- printf("virtio-block: backing device required\n");
+ WPRINTF(("virtio-block: backing device required\n\r"));
return (1);
}
Index: head/usr.sbin/bhyve/pci_virtio_console.c
===================================================================
--- head/usr.sbin/bhyve/pci_virtio_console.c
+++ head/usr.sbin/bhyve/pci_virtio_console.c
@@ -187,7 +187,7 @@
sc = vsc;
- DPRINTF(("vtcon: device reset requested!\n"));
+ DPRINTF(("vtcon: device reset requested!\n\r"));
vi_reset_dev(&sc->vsc_vs);
}
@@ -498,7 +498,7 @@
case VTCON_PORT_READY:
if (ctrl->id >= sc->vsc_nports) {
- WPRINTF(("VTCON_PORT_READY event for unknown port %d\n",
+ WPRINTF(("VTCON_PORT_READY event for unknown port %d\n\r",
ctrl->id));
return;
}
Index: head/usr.sbin/bhyve/pci_virtio_net.c
===================================================================
--- head/usr.sbin/bhyve/pci_virtio_net.c
+++ head/usr.sbin/bhyve/pci_virtio_net.c
@@ -143,7 +143,7 @@
{
struct pci_vtnet_softc *sc = vsc;
- DPRINTF(("vtnet: device reset requested !\n"));
+ DPRINTF(("vtnet: device reset requested !\n\r"));
/* Acquire the RX lock to block RX processing. */
pthread_mutex_lock(&sc->rx_mtx);
Index: head/usr.sbin/bhyve/pci_virtio_rnd.c
===================================================================
--- head/usr.sbin/bhyve/pci_virtio_rnd.c
+++ head/usr.sbin/bhyve/pci_virtio_rnd.c
@@ -102,7 +102,7 @@
sc = vsc;
- DPRINTF(("vtrnd: device reset requested !\n"));
+ DPRINTF(("vtrnd: device reset requested !\n\r"));
vi_reset_dev(&sc->vrsc_vs);
}
@@ -170,7 +170,7 @@
*/
len = read(fd, &v, sizeof(v));
if (len <= 0) {
- WPRINTF(("vtrnd: /dev/random not ready, read(): %d", len));
+ WPRINTF(("vtrnd: /dev/random not ready, read(): %d\n\r", len));
close(fd);
return (1);
}
Index: head/usr.sbin/bhyve/pci_virtio_scsi.c
===================================================================
--- head/usr.sbin/bhyve/pci_virtio_scsi.c
+++ head/usr.sbin/bhyve/pci_virtio_scsi.c
@@ -287,7 +287,7 @@
vq_endchains(q->vsq_vq, 0);
pthread_mutex_unlock(&q->vsq_qmtx);
- DPRINTF(("virtio-scsi: request <idx=%d> completed\n",
+ DPRINTF(("virtio-scsi: request <idx=%d> completed\n\r",
req->vsr_idx));
free(req);
}
@@ -303,7 +303,7 @@
sc = vsc;
- DPRINTF(("vtscsi: device reset requested\n"));
+ DPRINTF(("vtscsi: device reset requested\n\r"));
vi_reset_dev(&sc->vss_vs);
/* initialize config structure */
@@ -432,13 +432,13 @@
struct sbuf *sb = sbuf_new_auto();
ctl_io_sbuf(io, sb);
sbuf_finish(sb);
- DPRINTF(("pci_virtio_scsi: %s", sbuf_data(sb)));
+ DPRINTF(("pci_virtio_scsi: %s\n\r", sbuf_data(sb)));
sbuf_delete(sb);
}
err = ioctl(sc->vss_ctl_fd, CTL_IO, io);
if (err != 0)
- WPRINTF(("CTL_IO: err=%d (%s)\n", errno, strerror(errno)));
+ WPRINTF(("CTL_IO: err=%d (%s)\n\r", errno, strerror(errno)));
tmf->response = io->taskio.task_status;
ctl_scsi_free_io(io);
@@ -525,13 +525,13 @@
struct sbuf *sb = sbuf_new_auto();
ctl_io_sbuf(io, sb);
sbuf_finish(sb);
- DPRINTF(("pci_virtio_scsi: %s", sbuf_data(sb)));
+ DPRINTF(("pci_virtio_scsi: %s\n\r", sbuf_data(sb)));
sbuf_delete(sb);
}
err = ioctl(sc->vss_ctl_fd, CTL_IO, io);
if (err != 0) {
- WPRINTF(("CTL_IO: err=%d (%s)\n", errno, strerror(errno)));
+ WPRINTF(("CTL_IO: err=%d (%s)\n\r", errno, strerror(errno)));
cmd_wr->response = VIRTIO_SCSI_S_FAILURE;
} else {
cmd_wr->sense_len = MIN(io->scsiio.sense_len,
@@ -627,7 +627,7 @@
pthread_cond_signal(&q->vsq_cv);
pthread_mutex_unlock(&q->vsq_mtx);
- DPRINTF(("virtio-scsi: request <idx=%d> enqueued\n", idx));
+ DPRINTF(("virtio-scsi: request <idx=%d> enqueued\n\r", idx));
}
}
@@ -683,7 +683,7 @@
} else if (strcmp(optname, "iid") == 0 && opt != NULL) {
sc->vss_iid = strtoul(opt, NULL, 10);
} else {
- fprintf(stderr, "Invalid option %s\n", optname);
+ fprintf(stderr, "Invalid option %s\n\r", optname);
free(sc);
return (1);
}
@@ -692,7 +692,7 @@
sc->vss_ctl_fd = open(devname, O_RDWR);
if (sc->vss_ctl_fd < 0) {
- WPRINTF(("cannot open %s: %s\n", devname, strerror(errno)));
+ WPRINTF(("cannot open %s: %s\n\r", devname, strerror(errno)));
free(sc);
return (1);
}
Index: head/usr.sbin/bhyve/pci_xhci.c
===================================================================
--- head/usr.sbin/bhyve/pci_xhci.c
+++ head/usr.sbin/bhyve/pci_xhci.c
@@ -2554,10 +2554,10 @@
XHCI_PS_SPEED_SET(dev->dev_ue->ue_usbspeed);
}
- DPRINTF(("Init port %d 0x%x\n", portn, port->portsc));
+ DPRINTF(("Init port %d 0x%x\r\n", portn, port->portsc));
} else {
port->portsc = XHCI_PS_PLS_SET(UPS_PORT_LS_RX_DET) | XHCI_PS_PP;
- DPRINTF(("Init empty port %d 0x%x\n", portn, port->portsc));
+ DPRINTF(("Init empty port %d 0x%x\r\n", portn, port->portsc));
}
}
Index: head/usr.sbin/bhyve/rfb.c
===================================================================
--- head/usr.sbin/bhyve/rfb.c
+++ head/usr.sbin/bhyve/rfb.c
@@ -356,7 +356,7 @@
/* Compress with zlib */
err = deflate(&rc->zstream, Z_SYNC_FLUSH);
if (err != Z_OK) {
- WPRINTF(("zlib[rect] deflate err: %d\n", err));
+ WPRINTF(("zlib[rect] deflate err: %d\n\r", err));
rc->enc_zlib_ok = false;
deflateEnd(&rc->zstream);
goto doraw;
@@ -440,7 +440,7 @@
/* Compress with zlib */
err = deflate(&rc->zstream, Z_SYNC_FLUSH);
if (err != Z_OK) {
- WPRINTF(("zlib deflate err: %d\n", err));
+ WPRINTF(("zlib deflate err: %d\n\r", err));
rc->enc_zlib_ok = false;
deflateEnd(&rc->zstream);
goto doraw;
@@ -744,7 +744,7 @@
void
rfb_handle(struct rfb_softc *rc, int cfd)
{
- const char *vbuf = "RFB 003.008\n";
+ const char *vbuf = "RFB 003.008\n\r";
unsigned char buf[80];
unsigned char *message = NULL;
@@ -878,7 +878,7 @@
for (;;) {
len = read(cfd, buf, 1);
if (len <= 0) {
- DPRINTF(("rfb client exiting\r\n"));
+ DPRINTF(("rfb client exiting\n\r"));
break;
}
@@ -902,7 +902,7 @@
rfb_recv_cuttext_msg(rc, cfd);
break;
default:
- WPRINTF(("rfb unknown cli-code %d!\n", buf[0] & 0xff));
+ WPRINTF(("rfb unknown cli-code %d!\n\r", buf[0] & 0xff));
goto done;
}
}
@@ -1003,7 +1003,7 @@
hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV | AI_PASSIVE;
if ((e = getaddrinfo(hostname, servname, &hints, &ai)) != 0) {
- fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(e));
+ fprintf(stderr, "getaddrinfo: %s\n\r", gai_strerror(e));
goto error;
}
@@ -1043,7 +1043,7 @@
pthread_set_name_np(rc->tid, "rfb");
if (wait) {
- DPRINTF(("Waiting for rfb client...\n"));
+ DPRINTF(("Waiting for rfb client...\n\r"));
pthread_mutex_lock(&rc->mtx);
pthread_cond_wait(&rc->cond, &rc->mtx);
pthread_mutex_unlock(&rc->mtx);

File Metadata

Mime Type
text/plain
Expires
Sun, Aug 16, 9:38 AM (6 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36819543
Default Alt Text
D22552.diff (34 KB)

Event Timeline