1. 05 9月, 2013 9 次提交
    • J
      libxl: Check for regcomp failure · 3fed82da
      Jim Fehlig 提交于
      Change libxlGetAutoballoonConf() function to return an int
      for success/failure, and fail if regcomp fails.
      3fed82da
    • 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
    • J
      libxl: Fix Coverity warning · 5236aed8
      Jim Fehlig 提交于
      John Ferlan reported the following Coverity warning:
      
      In libxlDomainCoreDump() Coverity has noted a FORWARD_NULL reference:
      
      2004 	    if ((flags & VIR_DUMP_CRASH) && !vm->persistent) {
      2005 	        virDomainObjListRemove(driver->domains, vm);
      
      (20) Event assign_zero: 	Assigning: "vm" = "NULL".
      Also see events: 	[var_deref_model]
      
      2006 	        vm = NULL;
      2007 	    }
      2008
      2009 	    ret = 0;
      2010
      2011 	cleanup_unpause:
      
      (21) Event var_deref_model: 	Passing null pointer "vm" to function
           "virDomainObjIsActive(virDomainObjPtr)", which dereferences it. [details]
      Also see events: 	[assign_zero]
      
      2012 	    if (virDomainObjIsActive(vm) && paused) {
      2013 	        if (libxl_domain_unpause(priv->ctx, dom->id) != 0) {
      2014 	            virReportError(VIR_ERR_INTERNAL_ERROR,
      
      Removing the vm from domain obj list and setting it to NULL can be
      done in the previous 'if (flags & VIR_DUMP_CRASH)' conditional.  Fix
      the Coverity warning by ensuring vm is not NULL before testing if it
      is still active.
      5236aed8
    • E
      spec: default vbox according to libvirtd build · c021f5ce
      Eric Blake 提交于
      Commit ba5f3c7c moved virtualBox support into libvirtd, but the spec
      file was still unconditionally requesting it even when not building
      the server side.  Thankfully there were no ill effects for a
      client_only build, as most uses of %{with_vbox} were guarded by
      %{with_libvirtd}; but we might as well avoid confusion by more
      closely matching the makefile.
      
      * libvirt.spec.in (with_vbox): Hoist to server conditionals.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c021f5ce
    • E
      build: avoid stranded polkit file in client-only build · bf3d9811
      Eric Blake 提交于
      daemon/Makefile.am installs a .policy file if WITH_LIBVIRTD and
      WITH_POLKIT are both set.  src/Makefile.am, on the other hand,
      installs a .policy file if WITH_POLKIT1 is set, but without checking
      WITH_LIBVIRTD.  When running 'make rpm' with client_only manually
      set, on a Fedora 19 box, that leads to a failure:
      
      RPM build errors:
          Installed (but unpackaged) file(s) found:
         /usr/share/polkit-1/actions/org.libvirt.api.policy
      
      Fix it by adding another conditional.
      
      * src/Makefile.am (polkitaction_DATA): Make conditional.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      bf3d9811
    • E
      build: only install nwfilter examples when building nwfilter · b420df72
      Eric Blake 提交于
      'make rpm' with client_local set to 1 (by manual modification,
      or with RHEL 5 on s390) warns:
      
      RPM build errors:
          Installed (but unpackaged) file(s) found:
         /etc/libvirt/nwfilter/allow-arp.xml
         /etc/libvirt/nwfilter/allow-dhcp-server.xml
         /etc/libvirt/nwfilter/allow-dhcp.xml
         /etc/libvirt/nwfilter/allow-incoming-ipv4.xml
         /etc/libvirt/nwfilter/allow-ipv4.xml
         /etc/libvirt/nwfilter/clean-traffic.xml
         /etc/libvirt/nwfilter/no-arp-ip-spoofing.xml
         /etc/libvirt/nwfilter/no-arp-mac-spoofing.xml
         /etc/libvirt/nwfilter/no-arp-spoofing.xml
         /etc/libvirt/nwfilter/no-ip-multicast.xml
         /etc/libvirt/nwfilter/no-ip-spoofing.xml
         /etc/libvirt/nwfilter/no-mac-broadcast.xml
         /etc/libvirt/nwfilter/no-mac-spoofing.xml
         /etc/libvirt/nwfilter/no-other-l2-traffic.xml
         /etc/libvirt/nwfilter/no-other-rarp-traffic.xml
         /etc/libvirt/nwfilter/qemu-announce-self-rarp.xml
         /etc/libvirt/nwfilter/qemu-announce-self.xml
         /usr/share/polkit-1/actions/org.libvirt.api.policy
      
      The bulk of these are fixed with this patch.
      
      * examples/xml/nwfilter/Makefile.am (install-data-local)
      (uninstall-local): Make conditional.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b420df72
    • E
      build: only run fdstreamtest when libvirtd is built · adf335f0
      Eric Blake 提交于
      An rpm build with client_only set to 1 (for example, RHEL 5 on
      s390, or by modifying libvirt.spec.in) failed with
      
      TEST: fdstreamtest
       1) Stream read blocking                                              ... OK
       2) Stream read non-blocking                                          ... Unexpected EOF block 0 want 128
      FAILED
       3) Stream write blocking                                             ... OK
       4) Stream write non-blocking                                         ... Failed to finish stream: internal error: libvirt:  error : cannot execute binary /home/eblake/rpmbuild/BUILD/libvirt-1.1.1/tests/../src/libvirt_iohelper: No such file or directory
      
      Since the test depends on something that was only built for
      WITH_LIBVIRTD (see src/Makefile.am), we must do the same for
      the test.
      
      * tests/Makefile.am (test_programs): Make fdstreamtest conditional.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      adf335f0
    • E
      spec: fix rpm build when lxc disabled · d42906fd
      Eric Blake 提交于
      'make rpm' failed if ~/.rpmmacros contains '%_without_lxc 1',
      which simulates the case of not having lxc available.
      
      RPM build errors:
          File not found: /home/eblake/rpmbuild/BUILDROOT/libvirt-1.1.1-1.fc19.x86_64/etc/libvirt/virt-login-shell.conf
          File not found by glob: /home/eblake/rpmbuild/BUILDROOT/libvirt-1.1.1-1.fc19.x86_64/usr/share/man/man1/virt-login-shell.1*
          File not found: /home/eblake/rpmbuild/BUILDROOT/libvirt-1.1.1-1.fc19.x86_64/usr/bin/virt-login-shell
      make: *** [rpm] Error 1
      
      Reported by Dan Berrange.
      
      * libvirt.spec.in: Mark virt-login-shell as conditional on lxc.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d42906fd
    • D
      virGet{User,Group}Ent() don't say success on fail · 4c7d1eab
      Doug Goldstein 提交于
      When virGetUserEnt() and virGetGroupEnt() fail due to the uid or gid not
      existing on the machine they'll print a message like:
      
      $ virsh -c vbox:///session list
      error: failed to connect to the hypervisor
      error: Failed to find user record for uid '32655': Success
      
      The success at the end is a bit confusing. This changes it to:
      
      $ virsh -c vbox:///session list
      error: failed to connect to the hypervisor
      error: Failed to find user record for uid '32655'
      4c7d1eab
  2. 04 9月, 2013 25 次提交
  3. 03 9月, 2013 6 次提交