On 24 Jan 2017, at 16:31, Laine Stump wrote:
+    cmd = virCommandNew(binary);
+    virCommandAddArgList(cmd, "-s", "0,ahci", NULL);
+    virCommandSetErrorBuffer(cmd, &error);

Too bad there isn't some way you could learn both of these with a single run of the binary.

+    if (virCommandRun(cmd, &exit) < 0) {
+        ret = -1;
+        goto out;
+    }
+
+ if (strstr(error, "pci slot 0:0: unknown device \"ahci\"") == NULL)
+        *caps |= BHYVE_CAP_AHCI32SLOT;

That seems like a fairly fragile check. Are you certain there aren't older versions where the error string is different?

Anyway, lacking any better check, ACK.

AFAIR there is a patch in the queue for that upstream (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210111), but there hasn’t been much movement there.

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to