Revision 39eaab9a

b/monitor.c
351 351
{
352 352
    QString *json;
353 353

  
354
    json = qobject_to_json(data);
354
    if (mon->flags & MONITOR_USE_PRETTY)
355
	json = qobject_to_json_pretty(data);
356
    else
357
	json = qobject_to_json(data);
355 358
    assert(json != NULL);
356 359

  
357 360
    qstring_append_chr(json, '\n');
b/monitor.h
14 14
#define MONITOR_IS_DEFAULT    0x01
15 15
#define MONITOR_USE_READLINE  0x02
16 16
#define MONITOR_USE_CONTROL   0x04
17
#define MONITOR_USE_PRETTY    0x08
17 18

  
18 19
/* flags for monitor commands */
19 20
#define MONITOR_CMD_ASYNC       0x0001
b/qemu-config.c
283 283
        },{
284 284
            .name = "default",
285 285
            .type = QEMU_OPT_BOOL,
286
        },{
287
            .name = "pretty",
288
            .type = QEMU_OPT_BOOL,
286 289
        },
287 290
        { /* end of list */ }
288 291
    },
b/vl.c
1562 1562
        exit(1);
1563 1563
    }
1564 1564

  
1565
    if (qemu_opt_get_bool(opts, "pretty", 0))
1566
        flags |= MONITOR_USE_PRETTY;
1567

  
1565 1568
    if (qemu_opt_get_bool(opts, "default", 0))
1566 1569
        flags |= MONITOR_IS_DEFAULT;
1567 1570

  

Also available in: Unified diff