1. 21 9月, 2009 1 次提交
    • D
      Move all shared utility files to src/util/ · 1355e055
      Daniel P. Berrange 提交于
      * src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
        src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
        src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
        src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
        src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
        src/qparams.h, src/stats_linux.c, src/stats_linux.h,
        src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
        src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
        src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
        src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
        into src/util/
      * daemon/Makefile.am: Add -Isrc/util/ to build flags
      * src/Makefile.am: Add -Isrc/util/ to build flags and update for
        moved files
      * src/libvirt_private.syms: Export cgroup APIs since they're now
        in util rather than linking directly to drivers
      * src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
        when built under PROXY
      * proxy/Makefile.am: Update for changed file locations. Remove
        bogus build of event.c
      * tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
      1355e055
  2. 05 8月, 2009 1 次提交
  3. 14 5月, 2009 1 次提交
  4. 17 11月, 2008 1 次提交
  5. 30 5月, 2008 1 次提交
  6. 23 5月, 2008 1 次提交
    • R
      Standardize use of header files, making internal.h primary. · 1d8d4f86
      Richard W.M. Jones 提交于
      	* qemud/internal.h, qemud/qemud.h: Rename this file so it
      	doesn't conflict with src/internal.h.
      	* HACKING: Document how header files should be used.
      	* qemud/Makefile.am: Add src/ directory to includes.
      	* qemud/event.c, qemud/mdns.c, qemud/qemud.c, qemud/remote.c,
      	qemud/remote_protocol.c, qemud/remote_protocol.h,
      	qemud/remote_protocol.x, src/buf.c, src/libvirt.c,
      	src/nodeinfo.c, src/qemu_conf.c, src/qemu_driver.c,
      	src/stats_linux.c, src/storage_backend.c, src/storage_backend_fs.c,
      	src/storage_backend_iscsi.c, src/storage_backend_logical.c,
      	src/storage_conf.c, src/storage_driver.c, src/util.c,
      	src/util.h, src/virsh.c, src/virterror.c, src/xend_internal.c,
      	src/xml.c, tests/reconnect.c, tests/xmlrpctest.c,
      	tests/qparamtest.c: Standardize	use of header files.
      	* docs/*, po/*: Rebuild docs.
      1d8d4f86
  7. 16 5月, 2008 1 次提交
    • J
      start using c-ctype functions · c1ee35af
      Jim Meyering 提交于
      Up to now, we've been avoiding ctype functions like isspace, isdigit,
      etc.  because they are locale-dependent.  Now that we have the c-ctype
      functions, we can start using *them*, to make the code more readable
      with changes like these:
      
      -        /* This may not work on EBCDIC. */
      -        if ((*p >= 'a' && *p <= 'z') ||
      -            (*p >= 'A' && *p <= 'Z') ||
      -            (*p >= '0' && *p <= '9'))
      +        if (c_isalnum(*p))
      
      -    while ((*cur >= '0') && (*cur <= '9')) {
      +    while (c_isdigit(*cur)) {
      
      Also, some macros in conf.c used names that conflicted with
      standard meaning of "BLANK" and "SPACE", so I've adjusted them
      to be in line with the definition of e.g., isblank.
      In addition, I've wrapped those statement macros with do {...} while (0),
      so that we can't forget the ";" after a use.  There was one like that
      already (fixed below).  The missing semicolon would mess up automatic
      indenting.
      * src/buf.c (virBufferURIEncodeString):
      * src/conf.c (IS_EOL, SKIP_BLANKS_AND_EOL, SKIP_BLANKS)
      (virConfParseLong, virConfParseValue, virConfParseName)
      (virConfParseSeparator, virConfParseStatement, IS_BLANK, IS_CHAR)
      (IS_DIGIT, IS_SPACE, SKIP_SPACES):
      * src/nodeinfo.c:
      * src/qemu_conf.c (qemudParseInterfaceXML):
      * src/qemu_driver.c (qemudDomainBlockStats):
      * src/sexpr.c:
      * src/stats_linux.c:
      * src/util.c (virParseNumber, virDiskNameToIndex):
      * src/uuid.c (hextobin, virUUIDParse):
      * src/virsh.c:
      * src/xml.c (parseCpuNumber, virParseCpuSet):
      c1ee35af
  8. 09 5月, 2008 1 次提交
    • J
      Use gnulib's c-ctype.h, not <ctype.h>. · 25534052
      Jim Meyering 提交于
      # Convert uses of isspace to c_isspace, isdigit to c_isdigit, etc.
      re=$(man isspace|grep is.....,.is|sed 's/ -.*//' \
        |tr -s ', \n' \||sed 's/^|//;s/|$//')
      git grep -l -E "$re"|grep -Ev 'Chan|gnulib' \
        |xargs perl -pi -e 's/\b('"$re"')\b/c_$1/g'
      # Remove all uses of to_uchar
      git grep -l to_uchar|xargs perl -pi -e 's/to_uchar\((.*?)\)/$1/g'
      * src/util.h (to_uchar): Remove definition.
      (TOLOWER): Remove definition.
      (__virMacAddrCompare): Use c_tolower, not TOLOWER.
      Globally:
        Where needed, change <ctype.h> to <c-ctype.h>.
        Remove unnecessary inclusion of <ctype.h>.
      Ensure the global changes are never needed again:
      * Makefile.maint (sc_avoid_ctype_macros): Prohibit use of ctype
      macros.   Recommend c-ctype.h instead.
      (sc_prohibit_c_ctype_without_use): New rule.
      (sc_prohibit_ctype_h): New rule.  Disallow use of <ctype.h>.
      25534052
  9. 28 4月, 2008 1 次提交
  10. 11 4月, 2008 2 次提交
  11. 20 2月, 2008 1 次提交
  12. 06 2月, 2008 1 次提交
  13. 30 1月, 2008 2 次提交
    • J
      Enable the <config.h>-requiring test; fix violations · a3781881
      Jim Meyering 提交于
      Use <config.h>, not "config.h", per autoconf documentation.
      * Makefile.cfg (local-checks-to-skip) [sc_require_config_h]: Enable.
      * .x-sc_require_config_h: New file, to list exempted files.
      * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h.
      a3781881
    • J
      Given code like if (foo) free (foo); remove the useless "if (foo) " part. · acff2d11
      Jim Meyering 提交于
      Likewise, given if (foo != NULL) free (foo); remove the useless "if" test.
      
      * proxy/libvirt_proxy.c: Remove unnecessary "if" test before free.
      * python/generator.py: Likewise.
      * qemud/qemud.c: Likewise.
      * src/buf.c: Likewise.
      * src/conf.c: Likewise.
      * src/hash.c: Likewise.
      * src/iptables.c: Likewise.
      * src/libvirt.c: Likewise.
      * src/openvz_conf.c: Likewise.
      * src/qemu_conf.c: Likewise.
      * src/qemu_driver.c: Likewise.
      * src/remote_internal.c: Likewise.
      * src/test.c: Likewise.
      * src/virsh.c: Likewise.
      * src/virterror.c: Likewise.
      * src/xen_internal.c: Likewise.
      * src/xen_unified.c: Likewise.
      * src/xend_internal.c: Likewise.
      * src/xm_internal.c: Likewise.
      * src/xml.c: Likewise.
      * src/xmlrpc.c: Likewise.
      * src/xs_internal.c: Likewise.
      * tests/testutils.c: Likewise.
      * tests/xencapstest.c: Likewise.
      * tests/xmconfigtest.c: Likewise.
      acff2d11
  14. 17 12月, 2007 1 次提交
  15. 13 12月, 2007 1 次提交
  16. 12 12月, 2007 1 次提交
    • J
      Use a variable name as sizeof argument, not a type name. · 49230350
      Jim Meyering 提交于
      Given code like: T *var = calloc (n, sizeof (T));
      Convert to this: T *var = calloc (n, sizeof (*var));
      This first-cut change adjusts all malloc, calloc, and
      realloc statements.
      
      The only binary differences are in remote_internal.c
      (due to the bug fix) and in xmlrpc.c (due to factorization).
      
      * python/libvir.c: As above.
      * qemud/event.c: Likewise.
      * qemud/mdns.c: Likewise.
      * qemud/qemud.c: Likewise.
      * qemud/remote.c: Likewise.
      * src/bridge.c: Likewise.
      * src/buf.c: Likewise.
      * src/conf.c: Likewise.
      * src/hash.c: Likewise.
      * src/iptables.c: Likewise.
      * src/openvz_conf.c: Likewise.
      * src/qemu_conf.c: Likewise.
      * src/qemu_driver.c: Likewise.
      * src/test.c: Likewise.
      * src/xen_internal.c: Likewise.
      * src/xen_unified.c: Likewise.
      * src/xm_internal.c: Likewise.
      * src/xml.c: Likewise.
      * tests/qemuxml2argvtest.c: Likewise.
      * src/xmlrpc.c (xmlRpcValuePtr): Likewise, and minor factorization.
      * src/remote_internal.c (remoteAuthMakeCredentials): Use the right
      type when allocating space for an array of cred _pointers_.
      49230350
  17. 06 12月, 2007 1 次提交
    • J
      Include "config.h". · 87396257
      Jim Meyering 提交于
      * qemud/event.c: Likewise.
      * src/buf.c: Likewise.
      * src/hash.c: Likewise.
      * src/nodeinfo.c: Likewise.
      * src/openvz_conf.c: Likewise.
      * src/proxy_internal.c: Likewise.
      * src/virterror.c: Likewise.
      * src/xmlrpc.c: Likewise.
      * src/xs_internal.c: Likewise.
      * tests/conftest.c: Likewise.
      * tests/xmlrpctest.c: Likewise.
      This fixes a mingw build failure reported by Rich Jones.
      
      Author: Jim Meyering <meyering@redhat.com>
      87396257
  18. 19 10月, 2007 1 次提交
  19. 30 8月, 2007 1 次提交
  20. 09 7月, 2007 1 次提交
  21. 29 6月, 2007 1 次提交
  22. 27 6月, 2007 2 次提交
  23. 21 3月, 2007 2 次提交
  24. 16 3月, 2007 1 次提交