static void qdev_print_devinfos(bool show_no_user)

{

    static const char *cat_name[DEVICE_CATEGORY_MAX + 1] = {

        [DEVICE_CATEGORY_BRIDGE]  = "Controller/Bridge/Hub",

        [DEVICE_CATEGORY_USB]     = "USB",

        [DEVICE_CATEGORY_STORAGE] = "Storage",

        [DEVICE_CATEGORY_NETWORK] = "Network",

        [DEVICE_CATEGORY_INPUT]   = "Input",

        [DEVICE_CATEGORY_DISPLAY] = "Display",

        [DEVICE_CATEGORY_SOUND]   = "Sound",

        [DEVICE_CATEGORY_MISC]    = "Misc",

        [DEVICE_CATEGORY_MAX]     = "Uncategorized",

    };

    GSList *list, *elt;

    int i;

    bool cat_printed;



    list = g_slist_sort(object_class_get_list(TYPE_DEVICE, false),

                        devinfo_cmp);



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

        cat_printed = false;

        for (elt = list; elt; elt = elt->next) {

            DeviceClass *dc = OBJECT_CLASS_CHECK(DeviceClass, elt->data,

                                                 TYPE_DEVICE);

            if ((i < DEVICE_CATEGORY_MAX

                 ? !test_bit(i, dc->categories)

                 : !bitmap_empty(dc->categories, DEVICE_CATEGORY_MAX))

                || (!show_no_user && dc->no_user)) {

                continue;

            }

            if (!cat_printed) {

                error_printf("%s%s devices:\n", i ? "\n" : "",

                             cat_name[i]);

                cat_printed = true;

            }

            qdev_print_devinfo(dc);

        }

    }



    g_slist_free(list);

}

static void qdev_print_devinfos(bool show_no_user)

{

    static const char *cat_name[DEVICE_CATEGORY_MAX + 1] = {

        [DEVICE_CATEGORY_BRIDGE]  = "Controller/Bridge/Hub",

        [DEVICE_CATEGORY_USB]     = "USB",

        [DEVICE_CATEGORY_STORAGE] = "Storage",

        [DEVICE_CATEGORY_NETWORK] = "Network",

        [DEVICE_CATEGORY_INPUT]   = "Input",

        [DEVICE_CATEGORY_DISPLAY] = "Display",

        [DEVICE_CATEGORY_SOUND]   = "Sound",

        [DEVICE_CATEGORY_MISC]    = "Misc",

        [DEVICE_CATEGORY_MAX]     = "Uncategorized",

    };

    GSList *list, *elt;

    int i;

    bool cat_printed;



    list = g_slist_sort(object_class_get_list(TYPE_DEVICE, false),

                        devinfo_cmp);



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

        cat_printed = false;

        for (elt = list; elt; elt = elt->next) {

            DeviceClass *dc = OBJECT_CLASS_CHECK(DeviceClass, elt->data,

                                                 TYPE_DEVICE);

            if ((i < DEVICE_CATEGORY_MAX

                 ? !test_bit(i, dc->categories)

                 : !bitmap_empty(dc->categories, DEVICE_CATEGORY_MAX))

                || (!show_no_user && dc->no_user)) {

                continue;

            }

            if (!cat_printed) {

                error_printf("%s%s devices:\n", i ? "\n" : "",

                             cat_name[i]);

                cat_printed = true;

            }

            qdev_print_devinfo(dc);

        }

    }



    g_slist_free(list);

}

                || (!show_no_user && dc->no_user)) {
static void FUNC_0(bool VAR_0)

{

    static const char *VAR_1[DEVICE_CATEGORY_MAX + 1] = {

        [DEVICE_CATEGORY_BRIDGE]  = "Controller/Bridge/Hub",

        [DEVICE_CATEGORY_USB]     = "USB",

        [DEVICE_CATEGORY_STORAGE] = "Storage",

        [DEVICE_CATEGORY_NETWORK] = "Network",

        [DEVICE_CATEGORY_INPUT]   = "Input",

        [DEVICE_CATEGORY_DISPLAY] = "Display",

        [DEVICE_CATEGORY_SOUND]   = "Sound",

        [DEVICE_CATEGORY_MISC]    = "Misc",

        [DEVICE_CATEGORY_MAX]     = "Uncategorized",

    };

    GSList *list, *elt;

    int VAR_2;

    bool cat_printed;



    list = g_slist_sort(object_class_get_list(TYPE_DEVICE, false),

                        devinfo_cmp);



    for (VAR_2 = 0; VAR_2 <= DEVICE_CATEGORY_MAX; VAR_2++) {

        cat_printed = false;

        for (elt = list; elt; elt = elt->next) {

            DeviceClass *dc = OBJECT_CLASS_CHECK(DeviceClass, elt->data,

                                                 TYPE_DEVICE);

            if ((VAR_2 < DEVICE_CATEGORY_MAX

                 ? !test_bit(VAR_2, dc->categories)

                 : !bitmap_empty(dc->categories, DEVICE_CATEGORY_MAX))

                || (!VAR_0 && dc->no_user)) {

                continue;

            }

            if (!cat_printed) {

                error_printf("%s%s devices:\n", VAR_2 ? "\n" : "",

                             VAR_1[VAR_2]);

                cat_printed = true;

            }

            qdev_print_devinfo(dc);

        }

    }



    g_slist_free(list);

}

static void FUNC_0(bool VAR_0)
{ static const char *VAR_1[DEVICE_CATEGORY_MAX + 1] = { [DEVICE_CATEGORY_BRIDGE]  = "Controller/Bridge/Hub",
[DEVICE_CATEGORY_USB]     = "USB",
[DEVICE_CATEGORY_STORAGE] = "Storage",
[DEVICE_CATEGORY_NETWORK] = "Network",
[DEVICE_CATEGORY_INPUT]   = "Input",
[DEVICE_CATEGORY_DISPLAY] = "Display",
[DEVICE_CATEGORY_SOUND]   = "Sound",
[DEVICE_CATEGORY_MISC]    = "Misc",
[DEVICE_CATEGORY_MAX]     = "Uncategorized",
}; GSList *list, *elt; int VAR_2; bool cat_printed; list = g_slist_sort(object_class_get_list(TYPE_DEVICE, false),
devinfo_cmp); for (VAR_2 = 0; VAR_2 <= DEVICE_CATEGORY_MAX; VAR_2++) { cat_printed = false; for (elt = list; elt; elt = elt->next) { DeviceClass *dc = OBJECT_CLASS_CHECK(DeviceClass, elt->data,
TYPE_DEVICE); if ((VAR_2 < DEVICE_CATEGORY_MAX
? !test_bit(VAR_2, dc->categories)
: !bitmap_empty(dc->categories, DEVICE_CATEGORY_MAX))
|| (!VAR_0 && dc->no_user)) { continue; } if (!cat_printed) { error_printf("%s%s devices:\n", VAR_2 ? "\n" : "",
VAR_1[VAR_2]); cat_printed = true; } qdev_print_devinfo(dc); } } g_slist_free(list); }