1. 25 11月, 2010 2 次提交
    • E
      maint: ensure syntax check exceptions are distributed · 97cde147
      Eric Blake 提交于
      * Makefile.am (EXTRA_DIST): Factor exceptions files...
      (syntax_check_excpetions): into new list.  Include recently added
      exceptions.
      * cfg.mk (sc_x_sc_dist_check): New check, copied from coreutils.
      97cde147
    • E
      build: enforce files.h usage · f1fe9671
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_close): New syntax-check rule.
      * src/util/pci.c (pciWaitForDeviceCleanup): Fix violation.
      * .x-sc_prohibit_close: New exceptions.
      * Makefile.am (EXTRA_DIST): Distribute new file.
      f1fe9671
  2. 19 11月, 2010 1 次提交
    • 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
  3. 18 11月, 2010 2 次提交
    • 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
  4. 13 11月, 2010 1 次提交
  5. 09 11月, 2010 1 次提交
  6. 27 10月, 2010 1 次提交
    • E
      maint: fix syntax-check failure of previous patch · 1987b090
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_trailing_blank_lines): Delete; this is
      adequately covered by maint.mk's sc_prohibit_empty_lines_at_EOF.
      * .x-sc_prohibit_empty_lines_at_EOF: New file, to exempt raw
      patches.
      * Makefile.am (EXTRA_DIST): Include new exemption.
      1987b090
  7. 11 8月, 2010 1 次提交
  8. 05 8月, 2010 1 次提交
    • E
      build: rerun bootstrap if po/Makevars got nuked · 5f211d4b
      Eric Blake 提交于
      There has been a frequent complaint of:
      
      make[2]: Entering directory `/home/remote/eblake/libvirt/po'
      make[2]: *** No rule to make target `/config.status', needed by `Makefile'.  Stop.
      
      It happens after nuking and regenerating the po directory,
      which is a common action after running anything like
      'make dist' or 'make rpm' that dirties all the .po files.
      
      Teach autogen.sh that it must regenerate po/Makevars to avoid
      the missing variable declaration, and teach cfg.mk to recognize
      that a nuked po directory is cause to rerun autogen.sh.
      
      * cfg.mk (_update_required): Check for po/Makevars.
      * autogen.sh (bootstrap): Run bootstrap if it got lost.
      Diagnosed by Justin Clift.
      5f211d4b
  9. 24 7月, 2010 1 次提交
    • C
      Qemu remote protocol. · 337d201e
      Chris Lalancette 提交于
      Since we are adding a new "per-hypervisor" protocol, we
      make it so that the qemu remote protocol uses a new
      PROTOCOL and PROGRAM number.  This allows us to easily
      distinguish it from the normal REMOTE protocol.
      
      This necessitates changing the proc in remote_message_header
      from a "remote_procedure" to an "unsigned", which should
      be the same size (and thus preserve the on-wire protocol).
      
      Changes since v1:
       - Fixed up a couple of script problems in remote_generate_stubs.pl
       - Switch an int flag to a bool in dispatch.c
      
      Changes since v2:
       - None
      
      Changes since v3:
       - Change unsigned proc to signed proc, to conform to spec
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      337d201e
  10. 02 6月, 2010 1 次提交
  11. 28 5月, 2010 1 次提交
  12. 22 5月, 2010 1 次提交
    • J
      Add simple bitmap operations to utils · 2f32d7af
      Jim Fehlig 提交于
      V2:
        - Move bitmap impl to src/util/bitmap.[ch]
        - Use CHAR_BIT instead of explicit '8'
        - Use size_t instead of unsigned int
        - Fix calculation of bitmap size in virBitmapAlloc
        - Ensure bit is within range of map in the set, clear, and get
          operations
        - Use bool in virBitmapGetBit
        - Add virBitmapFree to free-like funcs in cfg.mk
      
      V3:
        - Check for overflow in virBitmapAlloc
        - Fix copy and paste bug in virBitmapAlloc
        - Use size_t in prototypes
        - Add ATTRIBUTE_NONNULL in prototypes where appropriate
          and remove NULL check from impl
      
      V4:
        - Add ATTRIBUTE_RETURN_CHECK in prototypes where appropriate.
      2f32d7af
  13. 21 5月, 2010 2 次提交
  14. 20 5月, 2010 1 次提交
  15. 19 5月, 2010 1 次提交
    • J
      maint: enforce no-markup policy wrt VIR_WARN-like macros · 052893cf
      Jim Meyering 提交于
      * cfg.mk (sc_prohibit_gettext_markup): New rule, to enforce
      this policy.  Contrary to most diagnostic-emitting functions,
      where we require _(...) markup, here, we require that _() *not*
      be used for certain functions (or function-like macros).
      052893cf
  16. 18 5月, 2010 2 次提交
    • J
      maint: add more free-like functions to the list and deal with fallout · a986892e
      Jim Meyering 提交于
      * cfg.mk (useless_free_options): Add many vir*Free* function names,
      and then remove the useless if-before-free tests exposed by running
      make syntax-check.
      * src/conf/interface_conf.c (virInterfaceDefFree): Remove useless "if".
      (virInterfaceAssignDef): Likewise.
      * src/conf/network_conf.c (virNetworkAssignDef): Likewise.
      * src/conf/storage_conf.c (virStoragePoolObjAssignDef): Likewise.
      * src/node_device/node_device_hal.c (dev_create): Likewise.
      * src/security/virt-aa-helper.c (vahDeinit): Likewise.
      * src/test/test_driver.c (testNodeDeviceCreateXML): Likewise.
      * src/util/conf.c (virConfSetValue): Likewise.
      a986892e
    • J
      maint: add virCgroupFree to the list of free-like functions · 933522a3
      Jim Meyering 提交于
      This makes the useless-if-before-free test in maint.mk spot
      uses of virCgroupFree just like it does for free and the other
      listed functions.
      * cfg.mk (useless_free_options): Add virCgroupFree.
      Prompted by suggestion from Eric Blake.
      933522a3
  17. 11 5月, 2010 1 次提交
    • E
      maint: avoid spurious output if program not present · 7cdf2663
      Eric Blake 提交于
      Some shells warn about missing programs before redirection;
      the idiomatic way to silence them is to run the program check
      inside a subshell, with the redirections outside the subshell.
      But a subshell is only needed in places where it is reasonable
      to expect the use of such a noisy shell in the first place.
      
      * src/Makefile.am (remote_protocol-structs): Use subshell, for
      FreeBSD 8.0 /bin/sh.
      * cfg.mk (sc_preprocessor_indentation): Avoid subshell, since the
      only users running cfg.mk can be assumed to have decent tools.
      7cdf2663
  18. 28 4月, 2010 1 次提交
  19. 22 4月, 2010 2 次提交
    • E
      maint: enforce whitespace on shell scripts · 1f7560e2
      Eric Blake 提交于
      Noticed because virt-pki-validate was very inconsistent on
      using tabs vs. 8 spaces, sometimes mixing both paradigms on
      a single line.
      
      'git diff -b' shows significant changes only in cfg.mk.
      
      * cfg.mk (sc_TAB_in_indentation): Add a few files.
      * daemon/libvirtd.init.in: Avoid tabs.
      * tools/virt-pki-validate.in: Likewise.
      1f7560e2
    • E
      maint: ignore 'make syntax-check' failure files · 871aa6e3
      Eric Blake 提交于
      * .gitignore: Add exemption.
      * cfg.mk (local-checks-to-skip): Ignore a test to silence a skip
      warning.
      871aa6e3
  20. 09 4月, 2010 2 次提交
    • M
      Cleanup the msg_gen_function list in cfg.mk · 98caf6db
      Matthias Bolte 提交于
      Remove symbols that don't exist anymore (e.g. ERROR0) or aren't
      message generating functions (e.g. VIR_FREE) or are now reported
      as unmarked because the grep command is different, but that should
      not be marked at all (e.g. DEBUG0).
      
      Also don't restrict one of the grep lines in the
      libvirt_unmarked_diagnostics rule to match exactly one space
      between function name and opening parenthesis.
      98caf6db
    • M
      remote: Remove virConnectPtr from error/errorf · 94553235
      Matthias Bolte 提交于
      Also unify error/errorf to remoteError and update cfg.mk accordingly.
      94553235
  21. 07 4月, 2010 4 次提交
  22. 05 4月, 2010 1 次提交
    • D
      Clarified error message · 1bbe12de
      David Allan 提交于
      * Since the file pattern matches RNG schemas as well as C sources, the error message should mention both.
      1bbe12de
  23. 03 4月, 2010 2 次提交
    • E
      build: improve check for out-of-date .gnulib submodule · d002c250
      Eric Blake 提交于
      git reset --hard 96e5a2d4
      ./autogen.sh
      make -s
      git pull
      make -s    <-- expecting auto-bootstrap here, doesn't happen
      
      Use git diff to expose whether the submodule has untracked changes,
      which are typical on an incremental pull if .gnulib was updated but
      the user did not manually run 'git submodule update'.
      
      After this patch is applied, I encountered a new problem when
      following the reproducing pattern.  Basically, the change to .gnulib
      between libvirt's commit 96e5a2d4 and this patch introduced a change
      to sys_ioctl.in.h, but gnulib (intentionally) does not make the
      replacement headers depend on Makefile changes.  Therefore, I ended up
      with the generated replacement header being broken:
      gnulib/lib/sys/ioctl.h complained about a use of @.  But that seems
      like something that should be fixed upstream in gnulib's bootstrap
      script (that is, when doing a gnulib update, all files created from
      .in.h file should probably be deleted).  Without the benefit of that
      proposed gnulib fix, I worked around the problem by manually removing
      the stale gnulib/lib/sys/ioctl.h.
      
      * autogen.sh (t): Also run bootstrap if the gnulib submodule needs
      to be updated.
      * cfg.mk (_autogen): Likewise.
      Reported by Matthias Bolte.
      d002c250
    • E
      build: import latest gnulib · e7168f79
      Eric Blake 提交于
      A lot of syntax check rules have to be rewritten, but the
      result is easier to maintain.  I tested each syntax rule
      by intentionally introducing a temporary violation of the rule.
      Additionally, some false positives for unmarked_diagnostics
      crept in, and an improved copyright_format test caught some bugs.
      
      * .gnulib: Update to latest.
      * cfg.mk (sc_prohibit_test_minus_ao): Delete, it was moved into
      gnulib's maint.mk.
      (sc_avoid_write, sc_prohibit_strcmp_and_strncmp)
      (sc_prohibit_asprintf, sc_prohibit_strncpy, sc_prohibit_readlink)
      (sc_prohibit_gethostname, sc_prohibit_gettext_noop)
      (sc_prohibit_VIR_ERR_NO_MEMORY, sc_prohibit_nonreentrant)
      (sc_prohibit_ctype_h, sc_TAB_in_indentation)
      (sc_avoid_ctype_macros)
      (sc_prohibit_virBufferAdd_with_string_literal)
      (sc_prohibit_gethostby, sc_copyright_format): Rewrite in terms of
      new maint.mk macros.
      (sc_libvirt_unmarked_diagnostics): Fix whitespace.
      * .x-sc_unmarked_diagnostics: New file.
      * tests/object-locking.ml: Fix copyright.
      * tools/virt-pki-validate.in: Likewise.
      * tools/virt-xml-validate.in: Likewise.
      e7168f79
  24. 01 4月, 2010 1 次提交
    • E
      build: more fallout from test -a · a792bf24
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_test_minus_ao): Also check for [.
      * docs/Makefile.am (%.html, html/index.html): Avoid non-portable
      test usage.
      * libvirt.spec.in (%post): Likewise.
      * tools/virt-pki-validate.in (servercert.pem): Likewise.
      * configure.ac (LOGNAME): Use test, not [, in files processed by
      autoconf.
      Detected by Matthias Bolte.
      a792bf24
  25. 31 3月, 2010 2 次提交
  26. 27 3月, 2010 1 次提交
    • E
      build: update gnulib · f0dc84d8
      Eric Blake 提交于
      Picks up fixes for gethostname compilation problems on mingw.
      
      * .gnulib: Update to latest.
      * build-aux/.gitignore: Regenerate.
      * cfg.mk (local-checks-to-skip): Avoid new test not relevent to
      libvirt.
      f0dc84d8
  27. 26 3月, 2010 2 次提交
  28. 24 3月, 2010 1 次提交