void qpci_plug_device_test(const char *driver, const char *id,

                           uint8_t slot, const char *opts)

{

    QDict *response;

    char *cmd;



    cmd = g_strdup_printf("{'execute': 'device_add',"

                          " 'arguments': {"

                          "   'driver': '%s',"

                          "   'addr': '%d',"

                          "   %s%s"

                          "   'id': '%s'"

                          "}}", driver, slot,

                          opts ? opts : "", opts ? "," : "",

                          id);

    response = qmp(cmd);

    g_free(cmd);

    g_assert(response);

    g_assert(!qdict_haskey(response, "error"));

    QDECREF(response);

}

void qpci_plug_device_test(const char *driver, const char *id,

                           uint8_t slot, const char *opts)

{

    QDict *response;

    char *cmd;



    cmd = g_strdup_printf("{'execute': 'device_add',"

                          " 'arguments': {"

                          "   'driver': '%s',"

                          "   'addr': '%d',"

                          "   %s%s"

                          "   'id': '%s'"

                          "}}", driver, slot,

                          opts ? opts : "", opts ? "," : "",

                          id);

    response = qmp(cmd);

    g_free(cmd);

    g_assert(response);

    g_assert(!qdict_haskey(response, "error"));

    QDECREF(response);

}

void FUNC_0(const char *VAR_0, const char *VAR_1,

                           uint8_t VAR_2, const char *VAR_3)

{

    QDict *response;

    char *VAR_4;



    VAR_4 = g_strdup_printf("{'execute': 'device_add',"

                          " 'arguments': {"

                          "   'VAR_0': '%s',"

                          "   'addr': '%d',"

                          "   %s%s"

                          "   'VAR_1': '%s'"

                          "}}", VAR_0, VAR_2,

                          VAR_3 ? VAR_3 : "", VAR_3 ? "," : "",

                          VAR_1);

    response = qmp(VAR_4);

    g_free(VAR_4);

    g_assert(response);

    g_assert(!qdict_haskey(response, "error"));

    QDECREF(response);

}

void FUNC_0(const char *VAR_0, const char *VAR_1,
uint8_t VAR_2, const char *VAR_3)
{ QDict *response; char *VAR_4; VAR_4 = g_strdup_printf("{'execute': 'device_add'," " 'arguments': {" "   'VAR_0': '%s',"
"   'addr': '%d',"
"   %s%s"
"   'VAR_1': '%s'"
"}}", VAR_0, VAR_2, VAR_3 ? VAR_3 : "", VAR_3 ? "," : "",
VAR_1); response = qmp(VAR_4); g_free(VAR_4); g_assert(response); g_assert(!qdict_haskey(response, "error")); QDECREF(response); }