Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/pci_virtio_scsi.c
Show First 20 Lines • Show All 656 Lines • ▼ Show 20 Lines | pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc, | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
pci_vtscsi_legacy_config(nvlist_t *nvl, const char *opts) | pci_vtscsi_legacy_config(nvlist_t *nvl, const char *opts) | ||||
{ | { | ||||
char *cp, *devname; | char *cp, *devname; | ||||
if (opts == NULL) | |||||
return (0); | |||||
cp = strchr(opts, ','); | cp = strchr(opts, ','); | ||||
if (cp == NULL) { | if (cp == NULL) { | ||||
set_config_value_node(nvl, "dev", opts); | set_config_value_node(nvl, "dev", opts); | ||||
return (0); | return (0); | ||||
} | } | ||||
devname = strndup(opts, cp - opts); | devname = strndup(opts, cp - opts); | ||||
set_config_value_node(nvl, "dev", devname); | set_config_value_node(nvl, "dev", devname); | ||||
free(devname); | free(devname); | ||||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |