Revision dbc0c67f

b/monitor.c
78 78
 * 'l'          target long (32 or 64 bit)
79 79
 * 'M'          just like 'l', except in user mode the value is
80 80
 *              multiplied by 2^20 (think Mebibyte)
81
 * 'o'          octets (aka bytes)
82
 *              user mode accepts an optional T, t, G, g, M, m, K, k
83
 *              suffix, which multiplies the value by 2^40 for
84
 *              suffixes T and t, 2^30 for suffixes G and g, 2^20 for
85
 *              M and m, 2^10 for K and k
81 86
 * 'f'          double
82 87
 *              user mode accepts an optional G, g, M, m, K, k suffix,
83 88
 *              which multiplies the value by 2^30 for suffixes G and
......
3703 3708
                qdict_put(qdict, key, qint_from_int(val));
3704 3709
            }
3705 3710
            break;
3711
        case 'o':
3712
            {
3713
                ssize_t val;
3714
                char *end;
3715

  
3716
                while (qemu_isspace(*p)) {
3717
                    p++;
3718
                }
3719
                if (*typestr == '?') {
3720
                    typestr++;
3721
                    if (*p == '\0') {
3722
                        break;
3723
                    }
3724
                }
3725
                val = strtosz(p, &end);
3726
                if (val < 0) {
3727
                    monitor_printf(mon, "invalid size\n");
3728
                    goto fail;
3729
                }
3730
                qdict_put(qdict, key, qint_from_int(val));
3731
                p = end;
3732
            }
3733
            break;
3706 3734
        case 'f':
3707 3735
        case 'T':
3708 3736
            {
......
4205 4233
        case 'i':
4206 4234
        case 'l':
4207 4235
        case 'M':
4236
        case 'o':
4208 4237
            if (qobject_type(client_arg) != QTYPE_QINT) {
4209 4238
                qerror_report(QERR_INVALID_PARAMETER_TYPE, client_arg_name,
4210 4239
                              "int");

Also available in: Unified diff