diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2799,6 +2799,7 @@ static QDict *monitor_parse_arguments(Monitor *mon, break; case 'o': { + int ret; int64_t val; char *end; @@ -2811,8 +2812,8 @@ static QDict *monitor_parse_arguments(Monitor *mon, break; } } - val = qemu_strtosz_MiB(p, &end); - if (val < 0) { + ret = qemu_strtosz_MiB(p, &end, &val); + if (ret < 0) { monitor_printf(mon, "invalid size\n"); goto fail; } |