static void qemu_chr_parse_spice_vmc(QemuOpts *opts, ChardevBackend *backend,

                                     Error **errp)

{

    const char *name = qemu_opt_get(opts, "name");



    if (name == NULL) {

        error_setg(errp, "chardev: spice channel: no name given");

        return;

    }

    backend->u.spicevmc = g_new0(ChardevSpiceChannel, 1);

    backend->u.spicevmc->type = g_strdup(name);

}

static void qemu_chr_parse_spice_vmc(QemuOpts *opts, ChardevBackend *backend,

                                     Error **errp)

{

    const char *name = qemu_opt_get(opts, "name");



    if (name == NULL) {

        error_setg(errp, "chardev: spice channel: no name given");

        return;

    }

    backend->u.spicevmc = g_new0(ChardevSpiceChannel, 1);

    backend->u.spicevmc->type = g_strdup(name);

}

static void FUNC_0(QemuOpts *VAR_0, ChardevBackend *VAR_1,

                                     Error **VAR_2)

{

    const char *VAR_3 = qemu_opt_get(VAR_0, "VAR_3");



    if (VAR_3 == NULL) {

        error_setg(VAR_2, "chardev: spice channel: no VAR_3 given");

        return;

    }

    VAR_1->u.spicevmc = g_new0(ChardevSpiceChannel, 1);

    VAR_1->u.spicevmc->type = g_strdup(VAR_3);

}

static void FUNC_0(QemuOpts *VAR_0, ChardevBackend *VAR_1,
Error **VAR_2)
{ const char *VAR_3 = qemu_opt_get(VAR_0, "VAR_3"); if (VAR_3 == NULL) { error_setg(VAR_2, "chardev: spice channel: no VAR_3 given"); return; } VAR_1->u.spicevmc = g_new0(ChardevSpiceChannel, 1); VAR_1->u.spicevmc->type = g_strdup(VAR_3); }