Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81c24f6f authored by Matt Reimer's avatar Matt Reimer Committed by Siva Velusamy
Browse files

Get fastboot working on OS X

Get fastboot working on OS X by calling USBDeviceOpen() before
calling SetConfiguration().

Change-Id: I5034721d5f33ef18273153ff40eb940baa8261cd
parent e656be33
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -293,6 +293,13 @@ static int try_device(io_service_t device, usb_handle *handle) {

    // So, we have a device, finally. Grab its vitals.


    kr = (*dev)->USBDeviceOpen(dev);
    if (kr != 0) {
        WARN("USBDeviceOpen");
        goto out;
    }

    kr = (*dev)->GetDeviceVendor(dev, &handle->info.dev_vendor);
    if (kr != 0) {
        ERR("GetDeviceVendor");
@@ -365,12 +372,16 @@ static int try_device(io_service_t device, usb_handle *handle) {
        goto error;
    }

    out:

    (*dev)->USBDeviceClose(dev);
    (*dev)->Release(dev);
    return 0;

    error:

    if (dev != NULL) {
        (*dev)->USBDeviceClose(dev);
        (*dev)->Release(dev);
    }