Revision d8aeeb31 block.c

b/block.c
1704 1704

  
1705 1705
    bs_dict = qobject_to_qdict(obj);
1706 1706

  
1707
    monitor_printf(mon, "%s: type=%s removable=%d",
1707
    monitor_printf(mon, "%s: removable=%d",
1708 1708
                        qdict_get_str(bs_dict, "device"),
1709
                        qdict_get_str(bs_dict, "type"),
1710 1709
                        qdict_get_bool(bs_dict, "removable"));
1711 1710

  
1712 1711
    if (qdict_get_bool(bs_dict, "removable")) {
......
1747 1746

  
1748 1747
    QTAILQ_FOREACH(bs, &bdrv_states, list) {
1749 1748
        QObject *bs_obj;
1750
        const char *type = "unknown";
1751

  
1752
        switch(bs->type) {
1753
        case BDRV_TYPE_HD:
1754
            type = "hd";
1755
            break;
1756
        case BDRV_TYPE_CDROM:
1757
            type = "cdrom";
1758
            break;
1759
        case BDRV_TYPE_FLOPPY:
1760
            type = "floppy";
1761
            break;
1762
        }
1763 1749

  
1764
        bs_obj = qobject_from_jsonf("{ 'device': %s, 'type': %s, "
1750
        bs_obj = qobject_from_jsonf("{ 'device': %s, 'type': 'unknown', "
1765 1751
                                    "'removable': %i, 'locked': %i }",
1766
                                    bs->device_name, type, bs->removable,
1752
                                    bs->device_name, bs->removable,
1767 1753
                                    bs->locked);
1768 1754

  
1769 1755
        if (bs->drv) {

Also available in: Unified diff