1. 08 11月, 2008 1 次提交
    • J
      always compile iptables.c · 0d4cdc05
      Jim Meyering 提交于
      Avoid a build error when configuring --without-xen --without-qemu.
      * src/iptables.c [WITH_QEMU]: Don't #ifdef-out.
      * src/iptables.h [WITH_QEMU]: Don't #ifdef-out.
      * src/util.c (virRun) [__MINGW32__]: Define a stub that always fails.
      0d4cdc05
  2. 07 11月, 2008 1 次提交
    • D
      add new logging module, and move existing definitions there · df93e1ee
      Daniel Veillard 提交于
      * src/logging.c src/logging.h proxy/Makefile.am proxy/libvirt_proxy.c
        src/Makefile.am src/cgroup.c src/datatypes.c src/domain_event.c
        src/internal.h src/libvirt.c src/lxc_container.c src/lxc_controller.c
        src/lxc_driver.c src/proxy_internal.c src/qemu_driver.c
        src/remote_internal.c src/storage_backend_disk.c src/util.c
        src/veth.c src/xen_internal.c src/xen_unified.c src/xend_internal.c:
        add new logging module, and move existing definitions there
      Daniel
      df93e1ee
  3. 06 11月, 2008 3 次提交
  4. 05 11月, 2008 1 次提交
  5. 24 10月, 2008 1 次提交
  6. 14 10月, 2008 1 次提交
    • J
      avoid many format string warnings · fd52c6ff
      Jim Meyering 提交于
      Building with --disable-nls exposed many new warnings like these:
      virsh.c:4952: warning: format not a string literal and no format ...
      util.c:163: warning: format not a string literal and no format arguments
      All but one of the following changes add a "%s" argument before
      the offending _(...) argument.
      
      This was the only manual change:
      * src/lxc_driver.c (lxcVersion): Use %s and strerror(errno)
      rather than %m, to avoid a warning from gcc -Wformat-security.
      
      Add "%s" before each warned about format-string-with-no-%-directive:
      * src/domain_conf.c (virDomainHostdevSubsysUsbDefParseXML)
      (virDomainDefParseString, virDomainDefParseFile):
      * src/hash.c (virGetConnect, __virGetDomain, virReleaseDomain)
      (__virGetNetwork, virReleaseNetwork, __virGetStoragePool)
      (virReleaseStoragePool, __virGetStorageVol, virReleaseStorageVol):
      * src/lxc_container.c (lxcContainerChild):
      * src/lxc_driver.c (lxcDomainDefine, lxcDomainUndefine)
      (lxcDomainGetInfo, lxcGetOSType, lxcDomainDumpXML)
      (lxcSetupInterfaces, lxcDomainStart, lxcDomainCreateAndStart)
      (lxcVersion, lxcGetSchedulerParameters):
      * src/network_conf.c (virNetworkDefParseString)
      (virNetworkDefParseFile):
      * src/openvz_conf.c (openvzReadNetworkConf, openvzLoadDomains):
      * src/openvz_driver.c (openvzDomainDefineCmd)
      (openvzDomainGetInfo, openvzDomainDumpXML, openvzDomainShutdown)
      (openvzDomainReboot, ADD_ARG_LIT, openvzDomainDefineXML)
      (openvzDomainCreateXML, openvzDomainCreate, openvzDomainUndefine)
      (openvzDomainSetAutostart, openvzDomainGetAutostart)
      (openvzDomainSetVcpus):
      * src/qemu_driver.c (qemudDomainBlockPeek, qemudDomainMemoryPeek):
      * src/remote_internal.c (remoteDomainBlockPeek)
      (remoteDomainMemoryPeek, remoteAuthPolkit):
      * src/sexpr.c (sexpr_new, _string2sexpr):
      * src/storage_backend_disk.c (virStorageBackendDiskMakeDataVol)
      (virStorageBackendDiskCreateVol):
      * src/storage_backend_fs.c
      (virStorageBackendFileSystemNetFindPoolSources):
      * src/storage_backend_logical.c (virStorageBackendLogicalFindLVs)
      (virStorageBackendLogicalFindPoolSources):
      * src/test.c (testOpenDefault, testOpenFromFile, testOpen)
      (testGetDomainInfo, testDomainRestore)
      (testNodeGetCellsFreeMemory):
      * src/util.c (virExec):
      * src/virsh.c (cmdAttachDevice, cmdDetachDevice)
      (cmdAttachInterface, cmdDetachInterface, cmdAttachDisk)
      (cmdDetachDisk, cmdEdit):
      * src/xend_internal.c (do_connect, wr_sync, xend_op_ext)
      (urlencode, xenDaemonDomainCreateXML)
      (xenDaemonDomainLookupByName_ids, xenDaemonDomainLookupByID)
      (xenDaemonParseSxprOS, xend_parse_sexp_desc_char)
      (xenDaemonParseSxprChar, xenDaemonParseSxprDisks)
      (xenDaemonParseSxpr, sexpr_to_xend_topology, sexpr_to_domain)
      (xenDaemonDomainFetch, xenDaemonDomainGetAutostart)
      (xenDaemonDomainSetAutostart, xenDaemonDomainMigratePerform)
      (xenDaemonDomainDefineXML, xenDaemonGetSchedulerType)
      (xenDaemonGetSchedulerParameters)
      (xenDaemonSetSchedulerParameters, xenDaemonDomainBlockPeek)
      (xenDaemonFormatSxprChr, virDomainXMLDevID):
      * src/xm_internal.c (xenXMConfigCacheRefresh, xenXMDomainPinVcpu)
      (xenXMDomainCreate, xenXMDomainDefineXML)
      (xenXMDomainAttachDevice, xenXMDomainDetachDevice):
      * src/xml.c (virXPathString, virXPathNumber, virXPathLong)
      (virXPathULong, virXPathBoolean, virXPathNode, virXPathNodeSet):
      * src/xs_internal.c (xenStoreOpen):
      fd52c6ff
  7. 10 10月, 2008 1 次提交
  8. 09 10月, 2008 1 次提交
  9. 05 9月, 2008 1 次提交
  10. 02 9月, 2008 1 次提交
  11. 29 8月, 2008 1 次提交
  12. 27 8月, 2008 1 次提交
  13. 21 8月, 2008 1 次提交
  14. 20 8月, 2008 4 次提交
  15. 13 8月, 2008 2 次提交
  16. 12 8月, 2008 1 次提交
  17. 08 8月, 2008 1 次提交
  18. 24 6月, 2008 1 次提交
  19. 19 6月, 2008 1 次提交
  20. 17 6月, 2008 1 次提交
  21. 30 5月, 2008 1 次提交
  22. 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
  23. 16 5月, 2008 2 次提交
    • 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
    • D
      2c37f479
  24. 15 5月, 2008 1 次提交
  25. 10 5月, 2008 1 次提交
  26. 09 5月, 2008 2 次提交
    • 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
    • J
      avoid one more ctype vs. sign-extension problem · b8111adf
      Jim Meyering 提交于
      * src/util.c (TOLOWER): Also convert tolower argument.
      b8111adf
  27. 25 4月, 2008 1 次提交
    • J
      avoid problems with sign-extended "char" operand to is* functions · 225ba3f0
      Jim Meyering 提交于
      * src/util.h (to_uchar): Define function.
      * src/nodeinfo.c (linuxNodeInfoCPUPopulate): Apply to_uchar to is* operand.
      * src/qemu_driver.c (qemudExtractMonitorPath): Likewise.
      * src/sexpr.c (_string2sexpr): Likewise.
      * src/stats_linux.c (xenLinuxDomainDeviceID): Likewise.
      * src/util.c (TOLOWER, __virMacAddrCompare, virParseMacAddr): Likewise.
      * src/virsh.c (cmdVcpupin, vshCommandGetToken): Likewise.
      225ba3f0
  28. 18 4月, 2008 1 次提交
    • R
      Fixes for MinGW. · 8df91acf
      Richard W.M. Jones 提交于
      	* configure.in: Fix pkg-config detection of libxml2,
      	  add -lgcrypt to gnutls lib.
      	* src/Makefile.am: If compiling --without-libvirtd then
      	  don't compile any part of the storage driver.
      	* configure.in, src/hash.c, src/internal.h: Detect availability
      	  of pthread library and compile out mutex code if not available.
      	* src/storage_driver.c, src/util.c: Ignore some missing
      	  headers on MinGW.
      8df91acf
  29. 11 4月, 2008 2 次提交
  30. 08 4月, 2008 1 次提交
    • J
      Don't fail to read a file because it's non-seekable (e.g., a pipe). · 3ce465f8
      Jim Meyering 提交于
      * src/util.c (fread_file_lim): New function.
      (__virFileReadAll): Use fread_file_lim, rather than requiring
      that stat.st_size provide a usable file size.
      * tests/read-non-seekable: New test, for the above.
      * tests/Makefile.am (test_scripts): Add read-non-seekable.
      * tests/test-lib.sh (mkfifo_or_skip_): New helper function.
      3ce465f8
  31. 27 3月, 2008 1 次提交