1. 25 1月, 2018 1 次提交
  2. 12 1月, 2018 1 次提交
  3. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  4. 18 10月, 2017 1 次提交
    • E
      maint: Replace tabs with spaces in all source files in repo · b08017ca
      Erik Skultety 提交于
      So we have a syntax-check rule to catch all tab indents but it naturally
      can't catch tab spacing, i.e. as a delimiter. This patch is a result of
      running 'vim -en +retab +wq'
      (using tabstop=8 softtabstop=4 shiftwidth=4 expandtab) on each file from
      a list generated by the following:
      find . -regextype gnu-awk \
               -regex ".*\.(rng|syms|html|s?[ch]|py|pl|php(\.code)?)(\.in)?" \
               | xargs git grep -lP "\t"
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      b08017ca
  5. 11 4月, 2017 1 次提交
  6. 08 3月, 2017 2 次提交
    • J
      util: Avoid possible NULL dereference in virSysinfoParsePPCProcessor · 15b88147
      John Ferlan 提交于
      Found by Coverity. Because there's an "if ((cur = strstr(base, "revision"))
       != NULL) {" followed by a "base = cur" coverity notes that 'base' could
      then be NULL causing the return to the top of the "while ((tmp_base =
      strstr(base, "processor")) != NULL) {" to have strstr deref a NULL 'base'
      pointer because the setting of base at the bottom of the loop is unconditional.
      
      Alter the code to set "base = cur" after processing each key. That will
      "ensure" that base doesn't get set to NULL if both "cpu" and "revision"
      do no follow a "processor".
      
      While a /proc/cpuinfo file that has a "processor" key but with neither
      a "cpu" nor a "revision" doesn't seem feasible, the code is written as if
      it could happen, so we have to account for it.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      15b88147
    • J
      util: Resource some resource leaks in virsysinfo code · 7744d994
      John Ferlan 提交于
      Calls to virFileReadAll after a VIR_ALLOC that return NULL all show
      a memory leak since 'ret' isn't virSysinfoDefFree'd and normal path
      "return ret" doesn't free outbuf.
      
      Reported by Coverity
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      7744d994
  7. 07 3月, 2017 2 次提交
  8. 11 4月, 2016 1 次提交
  9. 18 6月, 2015 1 次提交
  10. 12 6月, 2015 3 次提交
    • M
      virsysinfo: s/system/sysdef/ · c1dff918
      Michal Privoznik 提交于
      A variable can't be named system, obviously. Well, it can if the
      compiler is new enough to distinguish a variable named system and a
      function call system(). And some older systems, don't have wise
      compiler.
      
        CC     util/libvirt_util_la-virsysinfo.lo
      cc1: warnings being treated as errors
      ../../src/util/virsysinfo.c: In function 'virSysinfoParseSystem':
      ../../src/util/virsysinfo.c:649: error: declaration of 'system' shadows a global declaration [-Wshadow]
      /usr/include/stdlib.h:717: error: shadowed declaration is here [-Wshadow]
      make[3]: *** [util/libvirt_util_la-virsysinfo.lo] Error 1
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c1dff918
    • M
      virSysinfoDef: Exempt SYSTEM variables · 0b92974c
      Michal Privoznik 提交于
      Move all the system_* fields into a separate struct. Not only this
      simplifies the code a bit it also helps us to identify whether BIOS
      info is present. We don't have to check all the four variables for
      being not-NULL, but we can just check the pointer to the struct.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0b92974c
    • M
      virSysinfoDef: Exempt BIOS variables · 3f9cae18
      Michal Privoznik 提交于
      Move all the bios_* fields into a separate struct. Not only this
      simplifies the code a bit it also helps us to identify whether BIOS
      info is present. We don't have to check all the four variables for
      being not-NULL, but we can just check the pointer to the struct.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3f9cae18
  11. 27 5月, 2015 1 次提交
  12. 22 5月, 2015 1 次提交
    • M
      sysinfo: Fix reports on ARM · 85128e29
      Michal Privoznik 提交于
      Due to a kernel commit (b4b8f770e), cpuinfo format has changed on
      ARMs. Firstly, 'Processor: ...' may not be reported, it's
      replaced by 'model name: ...'. Secondly, the "Processor" string
      may occur in CPU name, e.g. 'ARMv7 Processor rev 5 (v7l)'.
      Therefore, we must firstly look for 'model name' and then for
      'Processor' if not found.
      Moreover, lines in the cpuinfo file are shuffled, so we better
      not manipulate the pointer to start of internal buffer as we may
      lost some info.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      85128e29
  13. 13 5月, 2015 1 次提交
  14. 18 12月, 2014 1 次提交
  15. 15 11月, 2014 1 次提交
  16. 03 7月, 2014 1 次提交
    • J
      Use virBufferCheckError everywhere we report OOM error · 92a8e72f
      Ján Tomko 提交于
      Replace:
      if (virBufferError(&buf)) {
          virBufferFreeAndReset(&buf);
          virReportOOMError();
          ...
      }
      
      with:
      if (virBufferCheckError(&buf) < 0)
          ...
      
      This should not be a functional change (unless some callers
      misused the virBuffer APIs - a different error would be reported
      then)
      92a8e72f
  17. 04 4月, 2014 1 次提交
  18. 25 3月, 2014 1 次提交
  19. 21 3月, 2014 1 次提交
  20. 18 3月, 2014 1 次提交
  21. 14 3月, 2014 1 次提交
  22. 21 1月, 2014 1 次提交
    • R
      Use AC_PATH_PROG to search for dmidecode · 881c6c00
      Roman Bogorodskiy 提交于
      This is useful in certain circumstances, for example when
      libvirtd is being executed by FreeBSD rc script, it cannot find
      dmidecode installed from FreeBSD ports because it doesn't have
      /usr/local (default prefix for ports) in PATH.
      881c6c00
  23. 20 1月, 2014 1 次提交
  24. 21 11月, 2013 1 次提交
    • E
      maint: fix comma style issues: util · c7c84fa5
      Eric Blake 提交于
      Most of our code base uses space after comma but not before;
      fix the remaining uses before adding a syntax check.
      
      * src/util/vircommand.c: Consistently use commas.
      * src/util/virlog.c: Likewise.
      * src/util/virnetdevbandwidth.c: Likewise.
      * src/util/virnetdevmacvlan.c: Likewise.
      * src/util/virnetdevvportprofile.c: Likewise.
      * src/util/virnetlink.c: Likewise.
      * src/util/virpci.c: Likewise.
      * src/util/virsysinfo.c: Likewise.
      * src/util/virusb.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c7c84fa5
  25. 16 10月, 2013 1 次提交
  26. 11 7月, 2013 1 次提交
  27. 10 7月, 2013 1 次提交
  28. 28 5月, 2013 1 次提交
    • E
      syntax: prefer space after semicolon in for loop · 146ba114
      Eric Blake 提交于
      I noticed several unusual spacings in for loops, and decided to
      fix them up.  See the next commit for the syntax check that found
      all of these.
      
      * examples/domsuspend/suspend.c (main): Fix spacing.
      * python/libvirt-override.c: Likewise.
      * src/conf/interface_conf.c: Likewise.
      * src/security/virt-aa-helper.c: Likewise.
      * src/util/virconf.c: Likewise.
      * src/util/virhook.c: Likewise.
      * src/util/virlog.c: Likewise.
      * src/util/virsocketaddr.c: Likewise.
      * src/util/virsysinfo.c: Likewise.
      * src/util/viruuid.c: Likewise.
      * src/vbox/vbox_tmpl.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      * tools/virsh-domain-monitor.c (vshDomainStateToString): Drop
      default case, to let compiler check us.
      * tools/virsh-domain.c (vshDomainVcpuStateToString): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      146ba114
  29. 24 5月, 2013 1 次提交
  30. 11 5月, 2013 1 次提交
    • L
      util: move virFile* functions from virutil.c to virfile.c · bfe7721d
      Laine Stump 提交于
      These all existed before virfile.c was created, and for some reason
      weren't moved.
      
      This is mostly straightfoward, although the syntax rule prohibiting
      write() had to be changed to have an exception for virfile.c instead
      of virutil.c.
      
      This movement pointed out that there is a function called
      virBuildPath(), and another almost identical function called
      virFileBuildPath(). They really should be a single function, which
      I'll take care of as soon as I figure out what the arglist should look
      like.
      bfe7721d
  31. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  32. 04 4月, 2013 1 次提交
  33. 21 12月, 2012 4 次提交