1. 23 12月, 2008 1 次提交
  2. 15 12月, 2008 1 次提交
    • J
      remove redundant optname arguments · 289d52c4
      Jim Meyering 提交于
      This is the second part of the change mentioned here:
      
        http://thread.gmane.org/gmane.comp.emulators.libvirt/10331
      
      It removes the essentially redundant "optname" parameter
      from each of the vshCommandOptNetworkBy and vshCommandOptDomainBy
      functions as well as the correspond macros (without "By" suffix).
      Now, instead of always passing the optname, "domain", to
      vshCommandOptDomainBy, that function requires that its command
      argument refer to an opts array containing a "domain" option.
      
      This normalization makes one more help-related change:
      it renames the net-start "name" argument to the more
      sensible and consistent "network".
      * src/virsh.c (VSH_BYNAME, vshCommandOptDomain)
      (cmd_has_option): New function, used in vshCommandOptDomainBy
      and vshCommandOptNetworkBy.
      (vshCommandOptDomainBy, vshCommandOptNetworkBy): Remove the optname
      parameter, it's always "domain" ("network").  Update all callers.
      Call cmd_has_option.
      (vshCommandOptNetwork, cmdAutostart, cmdConsole, cmdDomstate)
      (cmdDomblkstat, cmdDomIfstat, cmdSuspend, cmdUndefine, cmdStart)
      (cmdSave, cmdSchedinfo, cmdDump, cmdResume, cmdShutdown)
      (cmdReboot, cmdDestroy, cmdDominfo, cmdVcpuinfo, cmdVcpupin)
      (cmdSetvcpus, cmdSetmem, cmdSetmaxmem, cmdDumpXML, cmdDomname)
      (cmdDomid, cmdDomuuid, cmdMigrate, cmdNetworkAutostart)
      (cmdNetworkDestroy, cmdNetworkDumpXML, cmdNetworkName)
      (opts_network_start, cmdNetworkStart, cmdNetworkUndefine)
      (cmdNetworkUuid, cmdVNCDisplay, cmdTTYConsole, cmdAttachDevice)
      (cmdDetachDevice, cmdAttachInterface, cmdDetachInterface)
      (cmdAttachDisk, cmdDetachDisk, cmdEdit)
      * src/Makefile.am (virsh-pool-edit.c): This code is generated
      from cmdEdit, and cmdEdit uses the vshCommandOptDomain macro which
      now, with the changes above, has only 3 (was 4) arguments, yet the
      macro use is mapped to vshCommandOptPool, which still requires 4
      arguments.  So this change adjusts the sed code to reinsert the
      just-removed argument -- we're not changing pool-related code right
      now, because it's not as straight-forward.
      289d52c4
  3. 12 12月, 2008 1 次提交
    • J
      remove cvs $Id$ strings · 9c5470d2
      Jim Meyering 提交于
      * po/id.po: Likewise.
      * qemud/remote_generate_stubs.pl: Likewise.
      * src/virsh.c: Likewise.
      * tests/testutils.c: Likewise.
      * tests/testutils.h: Likewise.
      * RENAMES: Likewise.
      9c5470d2
  4. 10 12月, 2008 1 次提交
    • J
      fix just-broken "virsh start" and "virsh pool-start" commands · 3693a02f
      Jim Meyering 提交于
      * src/virsh.c (cmdPoolStart, cmdStart): Change hard-coded
      vshCommandOptDomainBy string argument to match just-changed
      option name.  Cole Robinson reported that "virsh start" was
      broken and provided that part of the fix.
      Bug introduced by yesterday's "virsh.c: tweak options to produce
      more accurate help".
      * tests/start: New file.  Test for the above fix.
      * tests/Makefile.am (test_scripts): Add start.
      3693a02f
  5. 08 12月, 2008 4 次提交
  6. 04 12月, 2008 1 次提交
  7. 24 11月, 2008 1 次提交
    • J
      tests: new test: virsh-synopsis · 62bcd5d3
      Jim Meyering 提交于
      * tests/virsh-synopsis: new file
      * tests/Makefile.am (test_scripts): Add virsh-synopsis.
      * src/virsh.c: Correct help SYNOPSIS for each of seven commands.
      
      When I first ran this script, "make check" failed like this:
        ...
        invalid help SYNOPSIS for net-create:
            create a network from an XML <file>
        invalid help SYNOPSIS for net-define:
            define a network from an XML <file>
        invalid help SYNOPSIS for net-start:
            start <network>
        invalid help SYNOPSIS for pool-create:
            create a pool from an XML <file>
        invalid help SYNOPSIS for pool-define:
            define a pool from an XML <file>
        invalid help SYNOPSIS for pool-start:
            start <pool>
        invalid help SYNOPSIS for vol-create:
            create <file>
        FAIL: virsh-synopsis
      62bcd5d3
  8. 21 11月, 2008 2 次提交
  9. 17 11月, 2008 1 次提交
  10. 14 11月, 2008 1 次提交
    • D
      KVM/QEmu migration support · df285bdd
      Daniel Veillard 提交于
      * qemud/remote.c qemud/remote_dispatch_localvars.h
        qemud/remote_dispatch_proc_switch.h qemud/remote_dispatch_prototypes.h
        qemud/remote_protocol.c qemud/remote_protocol.h
        qemud/remote_protocol.x src/driver.h src/libvirt.c
        src/libvirt_internal.h src/libvirt_sym.version src/lxc_driver.c
        src/openvz_driver.c src/qemu_conf.h src/qemu_driver.c
        src/remote_internal.c src/test.c src/virsh.c: large patch to
        add migration support for KVM/QEmu, based on the work of Rich Jones
        and Chris Lalancette. This introduce a new version of the prepare
        and finish steps of the migration, so changes the driver API and
        a lot of code.
      Daniel
      df285bdd
  11. 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
  12. 10 10月, 2008 1 次提交
    • D
      virDomainDefineXML, and a few additional cleanups · f6803c96
      Daniel Veillard 提交于
      * include/libvirt/libvirt.h[.in] include/libvirt/virterror.h
        qemud/remote* src/driver.h src/libvirt.c src/libvirt_sym.version
        src/lxc_driver.c src/openvz_driver.c src/proxy_internal.c
        src/qemu_driver.c src/remote_internal.c src/test.c src/virsh.c
        src/xen_internal.c src/xen_unified.c src/xen_unified.h
        src/xend_internal.c src/xend_internal.h src/xm_internal.c
        src/xs_internal.c docs/*: cleanup virDomainCreateLinux into
        virDomainDefineXML, and a few additional cleanups
      Daniel
      f6803c96
  13. 09 10月, 2008 2 次提交
  14. 17 9月, 2008 1 次提交
  15. 03 9月, 2008 1 次提交
  16. 02 9月, 2008 1 次提交
    • D
      Adds storage source element for pools · 41ce15a5
      Daniel Veillard 提交于
      * src/storage_backend.h src/storage_backend_logical.c
      src/storage_conf.c src/storage_conf.h src/virsh.c:
      Applied patches from David Lively to add storage source
      elements needed for storage pool
      * docs/formatstorage.html docs/formatstorage.html.in: associated
      documentation
      Daniel
      41ce15a5
  17. 28 8月, 2008 1 次提交
  18. 15 8月, 2008 1 次提交
  19. 12 8月, 2008 1 次提交
  20. 01 8月, 2008 3 次提交
  21. 23 7月, 2008 1 次提交
  22. 17 7月, 2008 1 次提交
  23. 29 5月, 2008 1 次提交
  24. 27 5月, 2008 1 次提交
  25. 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
  26. 22 5月, 2008 1 次提交
  27. 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
  28. 15 5月, 2008 1 次提交
  29. 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
  30. 28 4月, 2008 2 次提交
  31. 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
  32. 11 4月, 2008 1 次提交