1. 26 4月, 2013 1 次提交
  2. 18 4月, 2013 1 次提交
  3. 05 4月, 2013 3 次提交
  4. 26 3月, 2013 1 次提交
  5. 15 3月, 2013 2 次提交
    • M
      Cleanup useless flags specifications · 73cc87d1
      Martin Kletzander 提交于
      After we switched to C99 initialization, I noticed there were many
      places where the specification of .flags parameter differed.  After
      going through many options and deciding whether to unify the
      initialization to be '.flags = 0' or '.flags = VSH_OFLAG_NONE', I
      realized both can be removed and it makes the code easier to go
      through.
      73cc87d1
    • M
      Make vshDebug work when parsing parameters · abfff210
      Martin Kletzander 提交于
      The vshInit initializes ctl->debug by which vshDebug (which is also
      called in vshParseArgv) decides whether to print out the message or
      not.
      abfff210
  6. 20 2月, 2013 1 次提交
    • G
      virsh: distinguish errors between missing argument and wrong option · dd71fa11
      Guannan Ren 提交于
      Specifying ':' to suppress the error messages printed by getopt().
      Then, distinguish the two types of errors.
      
      Before:
       # virsh -c
         virsh: option requires an argument -- 'c'
         error: unsupported option '-?'. See --help.
      
      After:
       # virsh -c
         error: option '-c' requires an argument
      
       # virsh -x
         error: unsupported option '-x'. See --help.
      dd71fa11
  7. 19 2月, 2013 1 次提交
  8. 16 2月, 2013 1 次提交
  9. 13 2月, 2013 2 次提交
  10. 04 2月, 2013 1 次提交
    • P
      virsh: Add helper to request string arguments with error reporting · 41b5e845
      Peter Krempa 提交于
      This patch adds a helper function with similar semantics to
      vshCommandOptString that requests a string argument, but does some error
      reporting without the need to do it in the functions themselves.
      
      The error reporting also provides information about the parameter whose
      retrieval failed.
      41b5e845
  11. 23 1月, 2013 1 次提交
  12. 18 1月, 2013 1 次提交
  13. 17 1月, 2013 1 次提交
  14. 16 1月, 2013 1 次提交
  15. 14 1月, 2013 2 次提交
    • D
      Introduce an LXC specific public API & library · 3d1596b0
      Daniel P. Berrange 提交于
      This patch introduces support for LXC specific public APIs. In
      common with what was done for QEMU, this creates a libvirt_lxc.so
      library and libvirt/libvirt-lxc.h header file.
      
      The actual APIs are
      
        int virDomainLxcOpenNamespace(virDomainPtr domain,
                                      int **fdlist,
                                      unsigned int flags);
      
        int virDomainLxcEnterNamespace(virDomainPtr domain,
                                       unsigned int nfdlist,
                                       int *fdlist,
                                       unsigned int *noldfdlist,
                                       int **oldfdlist,
                                       unsigned int flags);
      
      which provide a way to use the setns() system call to move the
      calling process into the container's namespace. It is not
      practical to write in a generically applicable manner. The
      nearest that we could get to such an API would be an API which
      allows to pass a command + argv to be executed inside a
      container. Even if we had such a generic API, this LXC specific
      API is still useful, because it allows the caller to maintain
      the current process context, in particular any I/O streams they
      have open.
      
      NB the virDomainLxcEnterNamespace() API is special in that it
      runs client side, so does not involve the internal driver API.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      3d1596b0
    • D
      Convert HAVE_UDEV to WITH_UDEV · d3b05abf
      Daniel P. Berrange 提交于
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d3b05abf
  16. 21 12月, 2012 9 次提交
  17. 13 12月, 2012 2 次提交
    • J
      virsh: use vshReconnect for non-default connections too · 8d0e7eb4
      Ján Tomko 提交于
      For non-default connections (specified by the environment variable or
      the command line option) we call virConnectOpenAuth without registering
      the vshCatchDisconnect callback.
      
      This calls vshReconnect instead which takes care of it.
      8d0e7eb4
    • J
      virsh: don't lie about reconnection in vshReconnect · d94b501b
      Ján Tomko 提交于
      Since we (ab)use vshReconnect for the default URI connection, if it
      fails it might print 'Failed to reconnect to the hypervisor' even if we
      were never connected before.
      
      This changes it to only mention reconnection on the first try after
      getting disconnected.
      d94b501b
  18. 07 12月, 2012 1 次提交
    • P
      virsh: Fix usage of header termios.h · 989a427d
      Peter Krempa 提交于
      The termios struct exported by the termios.h header is used as an
      argument for vshMakeStdinRaw(). The header isn't used anywhere in
      tools/virsh-domain.c.
      
      This patch adds the header to the header declaring vshMakeStdinRaw() and
      removes other places in virsh.
      989a427d
  19. 03 12月, 2012 1 次提交
    • P
      virsh: Report errors if arguments of the schedinfo command are incorrect · bf720959
      Peter Krempa 提交于
      Libvirt's helper API's when called directly don't raise the error so
      that virsh remembers it. Subsequent calls to libvirt API's might reset
      the error.
      
      In case of schedinfo virDomainFree() in the cleanup section resets the
      error when virTypedParameterAssignFromStr() fails.
      
      This patch adds function vshSaveLibvirtError() that can be called after
      calling libvirt helper APIs to ensure the error is remembered.
      bf720959
  20. 30 11月, 2012 1 次提交
  21. 08 11月, 2012 1 次提交
    • E
      virsh: make ,, escape parsing common · 9d91a18e
      Eric Blake 提交于
      So far, none of the existing callers of vshStringToArray expected
      the user to ever pass a literal comma; meanwhile, snapshot parsing
      had rolled its own array parser.  Moving the comma escaping into
      the common function won't affect any existing callers, and will make
      this function reusable for adding memory handling to snapshot parsing.
      
      As a bonus, the testsuite was already testing snapshot parsing, so
      the fact that the test still passes means that we are now giving
      testsuite exposure to vshStringToArray.
      
      * tools/virsh-snapshot.c (vshParseSnapshotDiskspec): Move ,,
      parsing...
      * tools/virsh.c (vshStringToArray): ...into common function.
      Also, vshStrdup can't fail.
      9d91a18e
  22. 02 11月, 2012 1 次提交
  23. 01 11月, 2012 1 次提交
    • E
      build: prefer mkostemp for multi-thread safety · 4dbd6e96
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=871756
      
      Commit cd1e8d1c assumed that systems new enough to have journald
      also have mkostemp; but this is not true for uclibc.
      
      For that matter, use of mkstemp[s] is unsafe in a multi-threaded
      program.  We should prefer mkostemp[s] in the first place.
      
      * bootstrap.conf (gnulib_modules): Add mkostemp, mkostemps; drop
      mkstemp and mkstemps.
      * cfg.mk (sc_prohibit_mkstemp): New syntax check.
      * tools/virsh.c (vshEditWriteToTempFile): Adjust caller.
      * src/qemu/qemu_driver.c (qemuDomainScreenshot)
      (qemudDomainMemoryPeek): Likewise.
      * src/secret/secret_driver.c (replaceFile): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainScreenshot): Likewise.
      4dbd6e96
  24. 09 10月, 2012 1 次提交
    • D
      interface: add udev based backend for virInterface · 5a33366f
      Doug Goldstein 提交于
      Add a read-only udev based backend for virInterface. Useful for distros
      that do not have netcf support yet. Multiple libvirt based utilities use
      a HAL based fallback when virInterface is not available which is less
      than ideal. This implements:
      * virConnectNumOfInterfaces()
      * virConnectListInterfaces()
      * virConnectNumOfDefinedInterfaces()
      * virConnectListDefinedInterfaces()
      * virConnectListAllInterfaces()
      * virConnectInterfaceLookupByName()
      * virConnectInterfaceLookupByMACString()
      5a33366f
  25. 21 9月, 2012 1 次提交
  26. 20 9月, 2012 1 次提交