socsvn commit: r289684 - soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve
stefano at FreeBSD.org
stefano at FreeBSD.org
Thu Aug 13 12:28:26 UTC 2015
Author: stefano
Date: Thu Aug 13 12:28:23 2015
New Revision: 289684
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=289684
Log:
bhyve-ptnetmap: fix compilation warning
Modified:
soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/Makefile
soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/bhyverun.h
soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/pci_ptnetmap_memdev.c
soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/pci_virtio_ptnetmap.h
Modified: soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/Makefile
==============================================================================
--- soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/Makefile Thu Aug 13 11:06:17 2015 (r289683)
+++ soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/Makefile Thu Aug 13 12:28:23 2015 (r289684)
@@ -45,6 +45,7 @@
.PATH: ${.CURDIR}/../../sys/amd64/vmm
SRCS+= vmm_instruction_emul.c
+CFLAGS = -I${.CURDIR}/../../sys
DPADD= ${LIBVMMAPI} ${LIBMD} ${LIBUTIL} ${LIBPTHREAD}
LDADD= -lvmmapi -lmd -lutil -lpthread
Modified: soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/bhyverun.h
==============================================================================
--- soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/bhyverun.h Thu Aug 13 11:06:17 2015 (r289683)
+++ soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/bhyverun.h Thu Aug 13 12:28:23 2015 (r289684)
@@ -32,7 +32,8 @@
#ifndef CTASSERT /* Allow lint to override */
#define CTASSERT(x) _CTASSERT(x, __LINE__)
#define _CTASSERT(x, y) __CTASSERT(x, y)
-#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1]
+#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] \
+ __unused
#endif
#define VMEXIT_CONTINUE 1 /* continue from next instruction */
Modified: soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/pci_ptnetmap_memdev.c
==============================================================================
--- soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/pci_ptnetmap_memdev.c Thu Aug 13 11:06:17 2015 (r289683)
+++ soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/pci_ptnetmap_memdev.c Thu Aug 13 12:28:23 2015 (r289684)
@@ -253,7 +253,6 @@
ptn_memdev_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts)
{
struct ptn_memdev_softc *sc;
- uint64_t size;
int ret;
sc = ptn_memdev_find_empty_pi();
Modified: soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/pci_virtio_ptnetmap.h
==============================================================================
--- soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/pci_virtio_ptnetmap.h Thu Aug 13 11:06:17 2015 (r289683)
+++ soc2015/stefano/ptnetmap/stable/10/usr.sbin/bhyve/pci_virtio_ptnetmap.h Thu Aug 13 12:28:23 2015 (r289684)
@@ -235,7 +235,7 @@
PTNETMAP_CFG_FEAT_IOCTL;
/* Configure the net backend. */
- ret = ptnetmap_create(sc->ptn.state, &sc->ptn.cfg);
+ ret = ptnetmap_create(ptns, &sc->ptn.cfg);
if (ret)
goto err_ptn_create;
@@ -261,11 +261,11 @@
static int
pci_vtnet_ptnetmap_down(struct pci_vtnet_softc *sc)
{
+ struct ptnetmap_state *ptns = sc->ptn.state;
struct pci_devinst *pi;
struct vmctx *vmctx;
- int ret;
- if (!sc->ptn.state || !sc->ptn.up) {
+ if (!ptns || !sc->ptn.up) {
return (0);
}
@@ -282,7 +282,7 @@
sc->ptn.up = 0;
- return (ptnetmap_delete(sc->ptn.state));
+ return (ptnetmap_delete(ptns));
}
/*
@@ -292,9 +292,10 @@
pci_vtnet_ptnetmap_write(struct pci_vtnet_softc *sc, int offset, int size,
uint32_t value)
{
+ struct ptnetmap_state *ptns = sc->ptn.state;
uint32_t *val, ret;
- if (sc->ptn.state == NULL) {
+ if (ptns == NULL) {
printf("ERROR ptnetmap: not supported by backend\n");
return -1;
}
@@ -306,7 +307,7 @@
case PTNETMAP_VIRTIO_IO_PTFEAT:
val = (uint32_t *)(sc->ptn.reg + offset);
ret = (sc->ptn.features &= *val);
- ptnetmap_ack_features(sc->ptn.state, sc->ptn.features);
+ ptnetmap_ack_features(ptns, sc->ptn.features);
sc->ptn.reg[PTNETMAP_VIRTIO_IO_PTFEAT] = ret;
break;
@@ -325,7 +326,7 @@
ret = pci_vtnet_ptnetmap_down(sc);
break;
case NET_PARAVIRT_PTCTL_HOSTMEMID:
- ret = ptnetmap_get_hostmemid(sc->ptn.state);
+ ret = ptnetmap_get_hostmemid(ptns);
break;
case NET_PARAVIRT_PTCTL_IFNEW:
case NET_PARAVIRT_PTCTL_IFDELETE:
More information about the svn-soc-all
mailing list