1. 23 11月, 2010 18 次提交
  2. 22 11月, 2010 1 次提交
  3. 20 11月, 2010 5 次提交
  4. 19 11月, 2010 9 次提交
    • E
      maint: tighten strncmp syntax check · d2af8ffc
      Eric Blake 提交于
      Using 'int ret = strcmp(a, b)' in a qsort function is a valid use of
      str[n]cmp that should _not_ be turned to STREQ, but it was falling
      foul of our specific syntax-check.  Meanwhile, gnulib's maint.mk
      already has a tighter bound for strcmp, so we can copy that regex and
      just check for strncmp, which results in fewer false positives that
      require exceptions.
      
      * cfg.mk (sc_prohibit_strcmp_and_strncmp): Rename...
      (sc_prohibit_strncmp): ...to this, and tighten, to mirror
      maint.mk's sc_prohibit_strcmp's better regex.
      * Makefile.am (syntax_check_exceptions): Update exception rule.
      * .x-sc_prohibit_strcmp_and_strncmp: Rename...
      * .x-sc_prohibit_strncmp: ...and trim.
      d2af8ffc
    • D
    • E
      capabilities, cpu: use new array API · aca20efb
      Eric Blake 提交于
      * src/conf/capabilities.h (_virCaps, _virCapsHost, _virCapsGuest)
      (_virCapsGuestArch): Add additional fields.
      * src/conf/cpu_conf.h (_virCPUDef): Likewise.
      * src/conf/capabilities.c (virCapabilitiesFormatXML): Reflect
      updated type.
      (virCapabilitiesAddGuest, virCapabilitiesAddHostFeature)
      (virCapabilitiesAddHostMigrateTransport)
      (virCapabilitiesAddHostNUMACell, virCapabilitiesAddGuestFeature)
      (virCapabilitiesAddGuestDomain): Use new array APIs.
      * src/conf/cpu_conf.c (virCPUDefAddFeature, virCPUDefCopy)
      (virCPUDefParseXML): Likewise.
      * tests/testutilsqemu.c (testQemuCapsInit): Adjust test.
      aca20efb
    • E
      daemon: use safer memory growth macros · e6b68d74
      Eric Blake 提交于
      * daemon/libvirtd.h (qemud_server): Change types of members
      tracking array sizes, and add allocation trackers.
      * daemon/event.c (virEventLoop): Likewise.
      (virEventAddHandleImpl, virEventAddTimeoutImpl)
      (virEventCleanupTimeouts, virEventCleanupHandles): Use
      VIR_RESIZE_N instead of VIR_REALLOC_N.  Tweak debug messages to
      match type changes.
      * daemon/libvirtd.c (qemudDispatchServer, qemudRunLoop): Likewise.
      e6b68d74
    • E
      memory: make it easier to avoid quadratic scaling of arrays · 269d3b72
      Eric Blake 提交于
      * src/util/memory.h (VIR_RESIZE_N): New macro.
      * src/util/memory.c (virResizeN): New function.
      * src/libvirt_private.syms: Export new helper.
      * docs/hacking.html.in: Document it.
      * HACKING: Regenerate.
      269d3b72
    • E
      memory: make it safer to expand arrays · 5a0beacc
      Eric Blake 提交于
      * src/util/memory.h (VIR_REALLOC_N): Update docs.
      (VIR_EXPAND_N, VIR_SHRINK_N): New macros.
      (virAlloc, virAllocN, virReallocN, virAllocVar, virFree): Add some
      gcc attributes.
      * src/util/memory.c (virExpandN, virShrinkN): New functions.
      (virReallocN): Update docs.
      * src/libvirt_private.syms: Export new helpers.
      * docs/hacking.html.in: Prefer newer interfaces over
      VIR_REALLOC_N, since uninitialized memory can bite us.
      * HACKING: Regenerate.
      5a0beacc
    • O
      doc: Add doc for missed options of migrate · b503022e
      Osier Yang 提交于
      * tools/virsh.pod (add doc for options like "--p2p", "--direct",
      "--copy-storage-all", "dname", etc.)
      b503022e
    • O
      doc: add doc for missed parameters of attach-disk · 84146be4
      Osier Yang 提交于
      * tools/virsh.pod (add docs for --persistent and --sourcetype
      of attach-disk, break the long lines in the meantime)
      84146be4
    • D
      Fix a failure to restore SELinux label for character devices · 83fa1184
      Daniel Veillard 提交于
      The code in SELinuxRestoreSecurityChardevLabel() was trying to
      use SELinuxSetFilecon directly for devices or file types while
      it should really use SELinuxRestoreSecurityFileLabel encapsulating
      routine, which avoid various problems like resolving symlinks,
      making sure he file exists and work around NFS problems
      83fa1184
  5. 18 11月, 2010 7 次提交
    • M
      virt-aa-helper: Fix several compile errors · c505eafe
      Matthias Bolte 提交于
      Include locale.h for setlocale().
      
      Revert the usage string back to it's original form.
      
      Use puts() instead of fputs(), as fputs() expects a FILE*.
      
      Add closing parenthesis to some vah_error() calls.
      
      Use argv[0] instead of an undefined argv0.
      c505eafe
    • E
      build: fix autobuild failures on gcov upgrade · 38afe8f5
      Eric Blake 提交于
      Last time I ran ./autobuild.sh was on F13; and upgrading to F14
      exposed these leftovers due to a newer gcov than what was in the stale
      files, in the form of spurious messages that break 'make check':
      
      +profiling:/home/remote/eblake/libvirt-tmp/tools/virsh-console.gcda:Version mismatch - expected 405R got 404R
      
      and concluding with a bug in the autobuild.sh script itself:
      
      ./autobuild.sh: line 44: test: =: unary operator expected
      
      * autobuild.sh: avoid syntax error on failed test
      * tools/Makefile.am (CLEANFILES): Clean coverage files.
      38afe8f5
    • O
      doc: update virsh manual · ed0b7073
      Osier Yang 提交于
      * tools/virsh.pod (change things like "edit domain.xml" into
        "vi domain.xml", so that it's more clear for user)
      ed0b7073
    • E
      maint: avoid remaining sprintf uses · e8aba782
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_sprintf): New rule.
      (sc_prohibit_asprintf): Avoid false positives.
      * docs/hacking.html.in (Printf-style functions): Document the
      policy.
      * HACKING: Regenerate.
      * .x-sc_prohibit_sprintf: New exemptions.
      * Makefile.am (syntax_check_exceptions): Ship new file.
      * src/vbox/vbox_tmpl.c (vboxStartMachine, vboxAttachUSB): Use
      virAsprintf instead.
      * src/uml/uml_driver.c (umlOpenMonitor): Use snprintf instead.
      * tools/virsh.c (cmdDetachInterface): Likewise.
      * src/security/security_selinux.c (SELinuxGenSecurityLabel):
      Likewise.
      * src/openvz/openvz_driver.c (openvzDomainDefineCmd): Likewise,
      and ensure large enough buffer.
      e8aba782
    • E
      virt-aa-helper: translate error messages · c811d46f
      Eric Blake 提交于
      These messages are visible to the user, so they should be
      consistently translated.
      
      * cfg.mk (msg_gen_function): Add vah_error, vah_warning.
      * src/security/virt-aa-helper.c: Translate messages.
      (catchXMLError): Fix capitalization.
      c811d46f
    • E
      maint: update to latest gnulib · 144c06d4
      Eric Blake 提交于
      Allows bootstrap to work on FreeBSD, where gzip doesn't have a '.'
      in its version; and silences false positives in the new
      'make syntax-check' rule.
      
      * .gnulib: Update to latest.
      * bootstrap: Synchronize to upstream.
      * .x-sc_bindtextdomain: New exemptions.
      * Makefile.am (syntax_check_exceptions): Ship new file.
      * .gitignore: Regenerate per latest bootstrap, anchor entries that
      are only in the root directory, and consolidate entries from other
      generated .gitignore files.
      * build-aux/.gitignore, m4/.gitignore, po/.gitignore: Remove from
      version control, since bootstrap generates them.
      144c06d4
    • E
      maint: improve i18n on non-Linux · 981d2cda
      Eric Blake 提交于
      Per the gettext developer:
      http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00019.html
      http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00021.html
      
      gettext() doesn't work correctly on all platforms unless you have
      called setlocale().  Furthermore, gnulib's gettext.h has provisions
      for setting up a default locale, which is the preferred method for
      libraries to use gettext without having to call textdomain() and
      override the main program's default domain (virInitialize already
      calls bindtextdomain(), but this is insufficient without the
      setlocale() added in this patch; and a redundant bindtextdomain()
      in this patch doesn't hurt, but serves as a good example for other
      packages that need to bind a second translation domain).
      
      This patch is needed to silence a new gnulib 'make syntax-check'
      rule in the next patch.
      
      * daemon/libvirtd.c (main): Setup locale and gettext.
      * src/lxc/lxc_controller.c (main): Likewise.
      * src/security/virt-aa-helper.c (main): Likewise.
      * src/storage/parthelper.c (main): Likewise.
      * tools/virsh.c (main): Fix exit status.
      * src/internal.h (DEFAULT_TEXT_DOMAIN): Define, for gettext.h.
      (_): Simplify definition accordingly.
      * po/POTFILES.in: Add src/storage/parthelper.c.
      981d2cda