mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
bhyve: Fix build
Commit 2d43f0a2dcfd dropped virDomainDiskTranslateSourcePool()'s first argument but failed to update callers in the bhyve driver. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
edda152c98
commit
f9159efec8
@ -198,7 +198,7 @@ bhyveBuildAHCIControllerArgStr(const virDomainDef *def,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virDomainDiskTranslateSourcePool(conn, disk) < 0)
|
if (virDomainDiskTranslateSourcePool(disk) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
disk_source = virDomainDiskGetSource(disk);
|
disk_source = virDomainDiskGetSource(disk);
|
||||||
@ -289,12 +289,11 @@ bhyveBuildUSBControllerArgStr(const virDomainDef *def,
|
|||||||
static int
|
static int
|
||||||
bhyveBuildVirtIODiskArgStr(const virDomainDef *def ATTRIBUTE_UNUSED,
|
bhyveBuildVirtIODiskArgStr(const virDomainDef *def ATTRIBUTE_UNUSED,
|
||||||
virDomainDiskDefPtr disk,
|
virDomainDiskDefPtr disk,
|
||||||
virConnectPtr conn,
|
|
||||||
virCommandPtr cmd)
|
virCommandPtr cmd)
|
||||||
{
|
{
|
||||||
const char *disk_source;
|
const char *disk_source;
|
||||||
|
|
||||||
if (virDomainDiskTranslateSourcePool(conn, disk) < 0)
|
if (virDomainDiskTranslateSourcePool(disk) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (disk->device != VIR_DOMAIN_DISK_DEVICE_DISK) {
|
if (disk->device != VIR_DOMAIN_DISK_DEVICE_DISK) {
|
||||||
@ -562,7 +561,7 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn,
|
|||||||
/* Handled by bhyveBuildAHCIControllerArgStr() */
|
/* Handled by bhyveBuildAHCIControllerArgStr() */
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_DISK_BUS_VIRTIO:
|
case VIR_DOMAIN_DISK_BUS_VIRTIO:
|
||||||
if (bhyveBuildVirtIODiskArgStr(def, disk, conn, cmd) < 0)
|
if (bhyveBuildVirtIODiskArgStr(def, disk, cmd) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -672,10 +671,10 @@ virBhyveProcessBuildCustomLoaderCmd(virDomainDefPtr def)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
virBhyveUsableDisk(virConnectPtr conn, virDomainDiskDefPtr disk)
|
virBhyveUsableDisk(virDomainDiskDefPtr disk)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (virDomainDiskTranslateSourcePool(conn, disk) < 0)
|
if (virDomainDiskTranslateSourcePool(disk) < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ((disk->device != VIR_DOMAIN_DISK_DEVICE_DISK) &&
|
if ((disk->device != VIR_DOMAIN_DISK_DEVICE_DISK) &&
|
||||||
@ -729,7 +728,7 @@ virBhyveProcessBuildGrubbhyveCmd(virDomainDefPtr def,
|
|||||||
* across. */
|
* across. */
|
||||||
cd = hdd = userdef = NULL;
|
cd = hdd = userdef = NULL;
|
||||||
for (i = 0; i < def->ndisks; i++) {
|
for (i = 0; i < def->ndisks; i++) {
|
||||||
if (!virBhyveUsableDisk(conn, def->disks[i]))
|
if (!virBhyveUsableDisk(def->disks[i]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
diskdef = def->disks[i];
|
diskdef = def->disks[i];
|
||||||
@ -815,7 +814,7 @@ virBhyveProcessBuildGrubbhyveCmd(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static virDomainDiskDefPtr
|
static virDomainDiskDefPtr
|
||||||
virBhyveGetBootDisk(virConnectPtr conn, virDomainDefPtr def)
|
virBhyveGetBootDisk(virDomainDefPtr def)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
virDomainDiskDefPtr match = NULL;
|
virDomainDiskDefPtr match = NULL;
|
||||||
@ -851,7 +850,7 @@ virBhyveGetBootDisk(virConnectPtr conn, virDomainDefPtr def)
|
|||||||
/* If boot_dev is set, we return the first device of
|
/* If boot_dev is set, we return the first device of
|
||||||
* the request type */
|
* the request type */
|
||||||
for (i = 0; i < def->ndisks; i++) {
|
for (i = 0; i < def->ndisks; i++) {
|
||||||
if (!virBhyveUsableDisk(conn, def->disks[i]))
|
if (!virBhyveUsableDisk(def->disks[i]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (def->disks[i]->device == boot_dev) {
|
if (def->disks[i]->device == boot_dev) {
|
||||||
@ -875,7 +874,7 @@ virBhyveGetBootDisk(virConnectPtr conn, virDomainDefPtr def)
|
|||||||
int first_usable_disk_index = -1;
|
int first_usable_disk_index = -1;
|
||||||
|
|
||||||
for (i = 0; i < def->ndisks; i++) {
|
for (i = 0; i < def->ndisks; i++) {
|
||||||
if (!virBhyveUsableDisk(conn, def->disks[i]))
|
if (!virBhyveUsableDisk(def->disks[i]))
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
first_usable_disk_index = i;
|
first_usable_disk_index = i;
|
||||||
@ -907,7 +906,7 @@ virBhyveProcessBuildLoadCmd(virConnectPtr conn, virDomainDefPtr def,
|
|||||||
virDomainDiskDefPtr disk = NULL;
|
virDomainDiskDefPtr disk = NULL;
|
||||||
|
|
||||||
if (def->os.bootloader == NULL) {
|
if (def->os.bootloader == NULL) {
|
||||||
disk = virBhyveGetBootDisk(conn, def);
|
disk = virBhyveGetBootDisk(def);
|
||||||
|
|
||||||
if (disk == NULL)
|
if (disk == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user