1. 06 Nov, 2013 1 commit
  2. 10 Oct, 2013 2 commits
  3. 20 Aug, 2013 6 commits
  4. 30 Jul, 2013 1 commit
  5. 26 Jul, 2013 3 commits
  6. 30 Jan, 2013 1 commit
  7. 12 Jan, 2013 1 commit
  8. 19 Dec, 2012 5 commits
  9. 06 Dec, 2012 1 commit
  10. 29 Nov, 2012 1 commit
  11. 26 Nov, 2012 1 commit
  12. 30 Oct, 2012 1 commit
  13. 20 Aug, 2012 1 commit
    • Stefan Weil's avatar
      qapi: Fix memory leak · e36c8766
      Stefan Weil authored
      valgrind report:
      ==24534== 232 bytes in 2 blocks are definitely lost in loss record 1,245 of 1,601
      ==24534==    at 0x4824F20: malloc (vg_replace_malloc.c:236)
      ==24534==    by 0x293C88: malloc_and_trace (vl.c:2281)
      ==24534==    by 0x489AD99: ??? (in /lib/libglib-2.0.so.0.2400.1)
      ==24534==    by 0x489B23B: g_malloc0 (in /lib/libglib-2.0.so.0.2400.1)
      ==24534==    by 0x2B4EFC: opts_visitor_new (opts-visitor.c:376)
      ==24534==    by 0x29DEA5: net_client_init (net.c:708)
      ==24534==    by 0x29E6C7: net_init_client (net.c:966)
      ==24534==    by 0x2C2179: qemu_opts_foreach (qemu-option.c:1114)
      ==24534==    by 0x29E85B: net_init_clients (net.c:1008)
      ==24534==    by 0x296F40: main (vl.c:3463)
      Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
      Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
  14. 13 Aug, 2012 2 commits
  15. 23 Jul, 2012 3 commits
    • Laszlo Ersek's avatar
      qapi: introduce OptsVisitor · eb7ee2cb
      Laszlo Ersek authored
      This visitor supports parsing
        -option [type=]discriminator[,optarg1=val1][,optarg2=val2][,...]
      style QemuOpts objects into "native" C structures. After defining the type
      tree in the qapi schema (see below), a root type traversal with this
      visitor linked to the underlying QemuOpts object will build the "native" C
      representation of the option.
      The type tree in the schema, corresponding to an option with a
      discriminator, must have the following structure:
          scalar member for non-discriminated optarg 1 [*]
          list for repeating non-discriminated optarg 2 [*]
            wrapper struct
              single scalar member
            struct for discriminator case 1
              scalar member for optarg 3 [*]
              list for repeating optarg 4 [*]
                wrapper struct
                  single scalar member
              scalar member for optarg 5 [*]
            struct for discriminator case 2
      The "type" optarg name is fixed for the discriminator role. Its schema
      representation is "union of structures", and each discriminator value must
      correspond to a member name in the union.
      If the option takes no "type" descriminator, then the type subtree rooted
      at the union must be absent from the schema (including the union itself).
      Optarg values can be of scalar types str / bool / integers / size.
      Members marked with [*] may be defined as optional in the schema,
      describing an optional optarg.
      Repeating an optarg is supported; its schema representation must be "list
      of structure with single mandatory scalar member". If an optarg is not
      described as repeating in the schema (ie. it is defined as a scalar field
      instead of a list), its last occurrence will take effect. Ordering between
      differently named optargs is not preserved.
      A mandatory list (or an optional one which is reported to be available),
      corresponding to a repeating optarg, has at least one element after
      successful parsing.
      - Update opts_type_size() prototype to uint64_t.
      - Add opts_type_uint64() for options needing the full uint64_t range.
        (Internals could be extracted to "cutils.c".)
      - Allow negative values in opts_type_int().
      - Rebase to nested Makefiles.
      - Factor opts_visitor_insert() out of opts_start_struct() and call it
        separately for opts_root->id if there's any.
      - Don't require non-negative values in opts_type_int()'s error message.
      - g_malloc0() may return NULL for zero-sized requests. Support empty
        structures by requesting 1 byte for them instead.
      Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
    • Laszlo Ersek's avatar
      qapi: introduce "size" type · 092705d4
      Laszlo Ersek authored
      - fall back to uint64 rather than int
      Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
    • Paolo Bonzini's avatar
      qapi: fix error propagation · d195325b
      Paolo Bonzini authored
      Don't overwrite / leak previously set errors.
      Make traversal cope with missing mandatory sub-structs.
      Don't try to end a container that could not be started.
      - unchanged
      - instead of examining, assert that we never overwrite errors with
      - allow visitors to set a NULL struct pointer successfully, so traversal
        of incomplete objects can continue
      - check for a NULL "obj" before accessing "(*obj)->has_XXX" (this is not a
        typo, "obj != NULL" implies "*obj != NULL" here)
      - fix start_struct / end_struct balance for unions as well
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
  16. 13 Jul, 2012 1 commit
  17. 15 Jun, 2012 1 commit
  18. 08 Jun, 2012 2 commits
    • Michael Roth's avatar
      qapi: String visitor, use %f representation for floats · 173bbb75
      Michael Roth authored
      Currently string-output-visitor formats floats as %g, which is nice in
      that trailing 0's are automatically truncated, but otherwise this causes
      some issues:
       - it uses 6 significant figures instead of 6 decimal places, which
         means something like 155777.5 (which even has an exact floating point
         representation) will be rounded to 155778 when converted to a string.
       - output will be presented in scientific notation when the normalized
         form requires a 10^x multiplier. Not a huge deal, but arguably less
         readable for command-line arguments.
       - due to using scientific notation for numbers requiring more than 6
         significant figures, instead of hard-defined decimal places, it
         fails a lot of the test-visitor-serialization unit tests for floats.
      Instead, let's just use %f, which is what the QJSON and the QMP visitors
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
    • Michael Roth's avatar
      qapi: Add Visitor interfaces for uint*_t and int*_t · 4e27e819
      Michael Roth authored
      This adds visitor interfaces for fixed-width integers types.
      Implementing these in visitors is optional, otherwise we fall back to
      visit_type_int() (int64_t) with some additional bounds checking to avoid
      integer overflows for cases where the value fetched exceeds the bounds
      of our target C type.
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      [LE: exclude negative values in uint*_t Visitor interfaces]
      Signed-off-by: default avatarLaszlo Ersek <lersek@redhat.com>
      [AF: Merged fix by Laszlo]
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
  19. 07 Jun, 2012 1 commit
  20. 15 May, 2012 1 commit
  21. 14 May, 2012 1 commit
  22. 30 Apr, 2012 1 commit
    • Michael Roth's avatar
      qemu-ga: add a whitelist for fsfreeze-safe commands · f22d85e9
      Michael Roth authored
      Currently we rely on fsfreeze/thaw commands disabling/enabling logging
      then having other commands check whether logging is disabled to avoid
      executing if they aren't safe for running while a filesystem is frozen.
      Instead, have an explicit whitelist of fsfreeze-safe commands, and
      consolidate logging and command enablement/disablement into a pair
      of helper functions: ga_set_frozen()/ga_unset_frozen()
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
  23. 23 Apr, 2012 1 commit
  24. 27 Mar, 2012 1 commit