void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque)

{

    SaveStateEntry *se, *new_se;

    char id[256] = "";



    if (dev && dev->parent_bus && dev->parent_bus->info->get_dev_path) {

        char *path = dev->parent_bus->info->get_dev_path(dev);

        if (path) {

            pstrcpy(id, sizeof(id), path);

            pstrcat(id, sizeof(id), "/");

            qemu_free(path);



    pstrcat(id, sizeof(id), idstr);



    QTAILQ_FOREACH_SAFE(se, &savevm_handlers, entry, new_se) {

        if (strcmp(se->idstr, id) == 0 && se->opaque == opaque) {

            QTAILQ_REMOVE(&savevm_handlers, se, entry);




            qemu_free(se);



void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque)

{

    SaveStateEntry *se, *new_se;

    char id[256] = "";



    if (dev && dev->parent_bus && dev->parent_bus->info->get_dev_path) {

        char *path = dev->parent_bus->info->get_dev_path(dev);

        if (path) {

            pstrcpy(id, sizeof(id), path);

            pstrcat(id, sizeof(id), "/");

            qemu_free(path);



    pstrcat(id, sizeof(id), idstr);



    QTAILQ_FOREACH_SAFE(se, &savevm_handlers, entry, new_se) {

        if (strcmp(se->idstr, id) == 0 && se->opaque == opaque) {

            QTAILQ_REMOVE(&savevm_handlers, se, entry);




            qemu_free(se);



void FUNC_0(DeviceState *VAR_0, const char *VAR_1, void *VAR_2)

{

    SaveStateEntry *se, *new_se;

    char VAR_3[256] = "";



    if (VAR_0 && VAR_0->parent_bus && VAR_0->parent_bus->info->get_dev_path) {

        char *VAR_4 = VAR_0->parent_bus->info->get_dev_path(VAR_0);

        if (VAR_4) {

            pstrcpy(VAR_3, sizeof(VAR_3), VAR_4);

            pstrcat(VAR_3, sizeof(VAR_3), "/");

            qemu_free(VAR_4);



    pstrcat(VAR_3, sizeof(VAR_3), VAR_1);



    QTAILQ_FOREACH_SAFE(se, &savevm_handlers, entry, new_se) {

        if (strcmp(se->VAR_1, VAR_3) == 0 && se->VAR_2 == VAR_2) {

            QTAILQ_REMOVE(&savevm_handlers, se, entry);




            qemu_free(se);



void FUNC_0(DeviceState *VAR_0, const char *VAR_1, void *VAR_2)
{ SaveStateEntry *se, *new_se; char VAR_3[256] = ""; if (VAR_0 && VAR_0->parent_bus && VAR_0->parent_bus->info->get_dev_path) { char *VAR_4 = VAR_0->parent_bus->info->get_dev_path(VAR_0); if (VAR_4) { pstrcpy(VAR_3, sizeof(VAR_3), VAR_4); pstrcat(VAR_3, sizeof(VAR_3), "/"); qemu_free(VAR_4); pstrcat(VAR_3, sizeof(VAR_3), VAR_1); QTAILQ_FOREACH_SAFE(se, &savevm_handlers, entry, new_se) { if (strcmp(se->VAR_1, VAR_3) == 0 && se->VAR_2 == VAR_2) { QTAILQ_REMOVE(&savevm_handlers, se, entry); qemu_free(se);