Skip to content
Snippets Groups Projects
  1. Jun 12, 2019
    • Markus Armbruster's avatar
      Include qemu-common.h exactly where needed · a8d25326
      Markus Armbruster authored
      
      No header includes qemu-common.h after this commit, as prescribed by
      qemu-common.h's file comment.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190523143508.25387-5-armbru@redhat.com>
      [Rebased with conflicts resolved automatically, except for
      include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c
      block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c
      target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h
      target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h
      target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h
      target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and
      net/tap-bsd.c fixed up]
      a8d25326
  2. Feb 01, 2019
  3. Dec 20, 2017
  4. Sep 23, 2016
    • Fam Zheng's avatar
      uuid: Tighten uuid parse · 0d6ae947
      Fam Zheng authored
      
      sscanf is relatively loose (tolerate) on some invalid formats that we
      should fail instead of generating a wrong uuid structure, like with
      whitespaces and short strings.
      
      Add and use a helper function to first check the format.
      
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-11-git-send-email-famz@redhat.com>
      0d6ae947
    • Fam Zheng's avatar
      vl: Switch qemu_uuid to QemuUUID · 9c5ce8db
      Fam Zheng authored
      
      Update all qemu_uuid users as well, especially get rid of the duplicated
      low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API.
      
      Since qemu_uuid_parse is quite tangled with qemu_uuid, its switching to
      QemuUUID is done here too to keep everything in sync and avoid code
      churn.
      
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-10-git-send-email-famz@redhat.com>
      9c5ce8db
    • Fam Zheng's avatar
      uuid: Make null_uuid static · 3630be75
      Fam Zheng authored
      
      So that it doesn't have to be zeroed at each call.
      
      Suggested-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Reviewed-by: default avatarJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-3-git-send-email-famz@redhat.com>
      3630be75
    • Fam Zheng's avatar
      util: Add UUID API · cea25275
      Fam Zheng authored
      
      A number of different places across the code base use CONFIG_UUID. Some
      of them are soft dependency, some are not built if libuuid is not
      available, some come with dummy fallback, some throws runtime error.
      
      It is hard to maintain, and hard to reason for users.
      
      Since UUID is a simple standard with only a small number of operations,
      it is cleaner to have a central support in libqemuutil. This patch adds
      qemu_uuid_* functions that all uuid users in the code base can
      rely on. Except for qemu_uuid_generate which is new code, all other
      functions are just copy from existing fallbacks from other files.
      
      Note that qemu_uuid_parse is moved without updating the function
      signature to use QemuUUID, to keep this patch simple.
      
      Signed-off-by: default avatarFam Zheng <famz@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-2-git-send-email-famz@redhat.com>
      cea25275
Loading