QemuConsole *qemu_console_lookup_by_device(DeviceState *dev, uint32_t head)

{

    Error *local_err = NULL;

    Object *obj;

    uint32_t h;

    int i;



    for (i = 0; i < nb_consoles; i++) {

        if (!consoles[i]) {

            continue;

        }

        obj = object_property_get_link(OBJECT(consoles[i]),

                                       "device", &local_err);

        if (DEVICE(obj) != dev) {

            continue;

        }

        h = object_property_get_int(OBJECT(consoles[i]),

                                    "head", &local_err);

        if (h != head) {

            continue;

        }

        return consoles[i];

    }

    return NULL;

}

QemuConsole *qemu_console_lookup_by_device(DeviceState *dev, uint32_t head)

{

    Error *local_err = NULL;

    Object *obj;

    uint32_t h;

    int i;



    for (i = 0; i < nb_consoles; i++) {

        if (!consoles[i]) {

            continue;

        }

        obj = object_property_get_link(OBJECT(consoles[i]),

                                       "device", &local_err);

        if (DEVICE(obj) != dev) {

            continue;

        }

        h = object_property_get_int(OBJECT(consoles[i]),

                                    "head", &local_err);

        if (h != head) {

            continue;

        }

        return consoles[i];

    }

    return NULL;

}

    Error *local_err = NULL;     Error *local_err = NULL;     Error *local_err = NULL;     Error *local_err = NULL;                                        "device", &local_err);                                     "head", &local_err);
QemuConsole *FUNC_0(DeviceState *dev, uint32_t head)

{

    Error *local_err = NULL;

    Object *obj;

    uint32_t h;

    int VAR_0;



    for (VAR_0 = 0; VAR_0 < nb_consoles; VAR_0++) {

        if (!consoles[VAR_0]) {

            continue;

        }

        obj = object_property_get_link(OBJECT(consoles[VAR_0]),

                                       "device", &local_err);

        if (DEVICE(obj) != dev) {

            continue;

        }

        h = object_property_get_int(OBJECT(consoles[VAR_0]),

                                    "head", &local_err);

        if (h != head) {

            continue;

        }

        return consoles[VAR_0];

    }

    return NULL;

}

QemuConsole *FUNC_0(DeviceState *dev, uint32_t head)
{ Error *local_err = NULL; Object *obj; uint32_t h; int VAR_0; for (VAR_0 = 0; VAR_0 < nb_consoles; VAR_0++) { if (!consoles[VAR_0]) { continue; } obj = object_property_get_link(OBJECT(consoles[VAR_0]),
"device", &local_err); if (DEVICE(obj) != dev) { continue; } h = object_property_get_int(OBJECT(consoles[VAR_0]),
"head", &local_err); if (h != head) { continue; } return consoles[VAR_0]; } return NULL; }