1. 21 10月, 2013 1 次提交
  2. 30 9月, 2013 2 次提交
  3. 28 9月, 2013 1 次提交
    • E
      build: fix build --without-lxc · 8771b947
      Eric Blake 提交于
      'make distcheck' fails from a directory configured --without-lxc:
      
        GEN      virt-login-shell.1
      Can't write-open ../../tools/virt-login-shell.1: Permission denied at /usr/bin/pod2man line 69.
      
      * tools/Makefile.am (EXTRA_DIST): Ship pre-built man page.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      8771b947
  4. 27 9月, 2013 1 次提交
    • C
      virsh: Fix domdisplay when domain only uses TLS · 9976c4b9
      Christophe Fergeau 提交于
      It's possible to create a domain which will only use a TLS port
      and will not have a non-TLS port set by using:
      <graphics type='spice' autoport='yes' defaultMode='secure'/>
      In such a setup, the 'graphics' node for the running domain will be:
      <graphics type='spice' tlsPort='5900'
                autoport='yes' listen='127.0.0.1'
                defaultMode='secure'>
      
      However, cmdDomDisplay loops over all the 'graphics' node, and it
      ignores nodes which don't have a 'port' attribute. This means
      'virsh domdisplay' will only return an empty string for domains
      as the one above.
      
      This commit looks for both 'port' and 'tlsPort' before deciding
      to ignore a graphics node. It also makes sure 'port' is not printed
      when it's not set.
      This makes 'virsh domdisplay' return
      'spice://127.0.0.1?tls-port=5900' for domains using only a TLS
      port.
      Signed-off-by: NChristophe Fergeau <cfergeau@redhat.com>
      9976c4b9
  5. 25 9月, 2013 1 次提交
  6. 24 9月, 2013 1 次提交
  7. 20 9月, 2013 1 次提交
  8. 18 9月, 2013 1 次提交
  9. 17 9月, 2013 6 次提交
  10. 16 9月, 2013 1 次提交
  11. 13 9月, 2013 1 次提交
  12. 12 9月, 2013 1 次提交
  13. 06 9月, 2013 1 次提交
  14. 05 9月, 2013 2 次提交
    • D
      Stop free'ing 'const char *' strings · bbcdd9b5
      Daniel P. Berrange 提交于
      The VIR_FREE() macro will cast away any const-ness. This masked a
      number of places where we passed a 'const char *' string to
      VIR_FREE. Fortunately in all of these cases, the variable was not
      in fact const data, but a heap allocated string. Fix all the
      variable declarations to reflect this.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      bbcdd9b5
    • E
      virsh: fix build on mingw, which lacks termios stuff · 7e1cbd14
      Eric Blake 提交于
      Recent patches to fix handling of Ctrl-C when interacting with
      ssh are not portable to mingw, which lacks termios handling.
      The simplest solution is to just compile that code out, and
      if someone ever appears that has a serious interest in getting
      virsh fully functional even with ssh connections, they can
      provide patches at that time.
      
      * tools/virsh.h (_vshControl): Make termattr conditional.
      * tools/virsh.c (vshTTYIsInterruptCharacter)
      (vshTTYDisableInterrupt, vshTTYRestore, cfmakeraw, vshTTYMakeRaw)
      (main): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7e1cbd14
  15. 04 9月, 2013 1 次提交
    • E
      build: enforce makefile conditional style · ec81852f
      Eric Blake 提交于
      Automake has builtin support to prevent botched conditional nesting,
      but only if you use:
      if FOO
      else !FOO
      endif !FOO
      
      An example error message when using the wrong name:
      
      daemon/Makefile.am:378: error: else reminder (LIBVIRT_INIT_SCRIPT_SYSTEMD_TRUE) incompatible with current conditional: LIBVIRT_INIT_SCRIPT_SYSTEMD_FALSE
      daemon/Makefile.am:381: error: endif reminder (LIBVIRT_INIT_SCRIPT_SYSTEMD_TRUE) incompatible with current conditional: LIBVIRT_INIT_SCRIPT_SYSTEMD_FALSE
      
      As our makefiles tend to have quite a bit of nested conditionals,
      it's better to take advantage of the benefits of the build system
      double-checking that our conditionals are well-nested, but that
      requires a syntax check to enforce our usage style.
      
      Alas, unlike C preprocessor and spec files, we can't use indentation
      to make it easier to see how deeply nesting goes.
      
      * cfg.mk (sc_makefile_conditionals): New rule.
      * daemon/Makefile.am: Enforce the style.
      * gnulib/tests/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      * tools/Makefile.am: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ec81852f
  16. 03 9月, 2013 5 次提交
  17. 01 9月, 2013 1 次提交
  18. 31 8月, 2013 1 次提交
    • E
      build: only create virt-login-shell for lxc builds · b9189c80
      Eric Blake 提交于
      I noticed from an ./autobuild.sh run that we were installing a
      virt-login-shell.exe binary when cross-building for mingw,
      even though such a binary is necessarily worthless since the
      code depends on lxc which is a Linux-only concept.
      
      * tools/Makefile.am (conf_DATA, bin_PROGRAMS, dist_man1_MANS):
      Make virt-login-shell installation conditional.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b9189c80
  19. 30 8月, 2013 1 次提交
  20. 29 8月, 2013 1 次提交
    • E
      virsh: detect programming errors with option parsing · 8aecd351
      Eric Blake 提交于
      Noticed while reviewing another patch that had an accidental
      mismatch due to refactoring.  An audit of the code showed that
      very few callers of vshCommandOpt were expecting a return of
      -2, indicating programmer error, and of those that DID check,
      they just propagated that status to yet another caller that
      did not check.  Fix this by making the code blatantly warn
      the programmer, rather than silently ignoring it and possibly
      doing the wrong thing downstream.
      
      I know that we frown on assert()/abort() inside libvirtd
      (libraries should NEVER kill the program that linked them),
      but as virsh is an app rather than the library, and as this
      is not the first use of assert() in virsh, I think this
      approach is okay.
      
      * tools/virsh.h (vshCommandOpt): Drop declaration.
      * tools/virsh.c (vshCommandOpt): Make static, and add a
      parameter.  Abort on programmer errors rather than making callers
      repeat that logic.
      (vshCommandOptInt, vshCommandOptUInt, vshCommandOptUL)
      (vshCommandOptString, vshCommandOptStringReq)
      (vshCommandOptLongLong, vshCommandOptULongLong)
      (vshCommandOptBool): Adjust callers.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      8aecd351
  21. 28 8月, 2013 7 次提交
    • J
      virt-sanlock-cleanup; Fix augtool usage · 74c5156f
      Jiri Denemark 提交于
      Surprisingly, augtool get (or print) returns "path = value" while we are
      only interested in the value. We need to remove the "path = " part from
      the augtool's output. The following is an example of the augtool command
      as used in virt-sanlock-cleanup script:
      
      $ augtool get /files/etc/libvirt/qemu-sanlock.conf/disk_lease_dir
      /files/etc/libvirt/qemu-sanlock.conf/disk_lease_dir = /var/lib/libvirt/sanlock
      74c5156f
    • M
      virsh: Fix debugging · ac43da70
      Martin Kletzander 提交于
      Commit a0b6a36f "fixed" what abfff210 broke (URI precedence), but
      there was still one more thing missing to fix.  When using virsh
      parameters to setup debugging, those weren't honored, because at the
      time debugging was initializing, arguments weren't parsed yet.  To
      make ewerything work as expected, we need to initialize the debugging
      twice, once before debugging (so we can debug option parsing properly)
      and then again after these options are parsed.
      
      As a side effect, this patch also fixes a leak when virsh is ran with
      multiple '-l' parameters.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      ac43da70
    • M
      virsh-pool.c: Don't jump over variable declaration · 2ab0948d
      Michal Privoznik 提交于
      Since 785ff34b we are using the outputStr variable in cleanup label.
      However, there is a possibility to jump to the label before the variable
      has been declared:
      
      virsh-pool.c: In function 'cmdPoolList':
      virsh-pool.c:1121:25: error: jump skips variable initialization [-Werror=jump-misses-init]
                               goto asprintf_failure;
                               ^
      virsh-pool.c:1308:1: note: label 'asprintf_failure' defined here
       asprintf_failure:
       ^
      virsh-pool.c:1267:11: note: 'outputStr' declared here
           char *outputStr = NULL;
      2ab0948d
    • J
      virsh: free the caps list properly if one of them is invalid · 14d53286
      Ján Tomko 提交于
      VIR_FREE(caps) is not enough to free an array allocated
      by vshStringToArray.
      
      ==17== 4 bytes in 1 blocks are definitely lost in loss record 4 of 728
      ==17==    by 0x4EFFC44: virStrdup (virstring.c:554)
      ==17==    by 0x128B10: _vshStrdup (virsh.c:125)
      ==17==    by 0x129164: vshStringToArray (virsh.c:218)
      ==17==    by 0x157BB3: cmdNodeListDevices (virsh-nodedev.c:409)
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1001536
      14d53286
    • J
      virsh: free the formatting string when listing pool details · 785ff34b
      Ján Tomko 提交于
      ==23== 41 bytes in 1 blocks are definitely lost in loss record 626 of 727
      ==23==    by 0x4F0099F: virAsprintfInternal (virstring.c:358)
      ==23==    by 0x15D2C9: cmdPoolList (virsh-pool.c:1268)
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1001536
      785ff34b
    • J
      virsh: free the list from ListAll APIs even for 0 items · f733eac0
      Ján Tomko 提交于
      virsh secret-list leak when no secrets are defined:
      
      ==27== 8 bytes in 1 blocks are definitely lost in loss record 6 of 726
      ==27==    by 0x4E941DD: virAllocN (viralloc.c:183)
      ==27==    by 0x5037F1A: remoteConnectListAllSecrets (remote_driver.c:3076)
      ==27==    by 0x5004EC6: virConnectListAllSecrets (libvirt.c:16298)
      ==27==    by 0x15F813: vshSecretListCollect (virsh-secret.c:397)
      ==27==    by 0x15F0E1: cmdSecretList (virsh-secret.c:532)
      
      And so do some other *-list commands.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1001536
      f733eac0
    • J
      virsh: free messages after logging them to a file · 66d124b4
      Ján Tomko 提交于
      The messages were only freed on error.
      
      ==12== 1,100 bytes in 1 blocks are definitely lost in loss record 698 of 729
      ==12==    by 0x4E98C22: virBufferAsprintf (virbuffer.c:294)
      ==12==    by 0x12C950: vshOutputLogFile (virsh.c:2440)
      ==12==    by 0x12880B: vshError (virsh.c:2254)
      ==12==    by 0x131957: vshCommandOptDomainBy (virsh-domain.c:109)
      ==12==    by 0x14253E: cmdStart (virsh-domain.c:3333)
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1001536
      66d124b4
  22. 27 8月, 2013 2 次提交