1. 09 3月, 2016 4 次提交
    • P
      conf: introduce parser feature flags · 23eb3821
      Peter Krempa 提交于
      To avoid having to forbid new features added to domain XML in post parse
      callbacks for individual hypervisor drivers the feature flag mechanism
      will allow to add a central check that will be disabled for the drivers
      that will add support.
      
      As a first example flag, the 'hasWideSCSIBus' is converted to the new
      bitmap.
      23eb3821
    • P
      qemu: Report pinning for all vCPUs in qemuDomainGetVcpuPinInfo · 0fe41f1a
      Peter Krempa 提交于
      The API documentation states that the function is returning pinning for
      all vCPUs, so we can actually do so if the user passes a large enough
      array.
      0fe41f1a
    • P
      conf: Extract code filling data for virDomainGetVcpuPinInfo · e498e904
      Peter Krempa 提交于
      The implementation of the inner guts of the function is similar for all
      drivers, so we can add a helper and not have to reimplement it three
      times.
      e498e904
    • P
      virsh: vcpupin: Ask for pinning info for all vCPUs · e7e6980d
      Peter Krempa 提交于
      The API docs state that the API queries pinning info for all vCPUs and
      thus we should allocate the bitmap even for the inactive ones.
      
      The API will currently return bitmap only for the active vCPUs but that
      will change in the future.
      e7e6980d
  2. 08 3月, 2016 21 次提交
  3. 07 3月, 2016 2 次提交
  4. 04 3月, 2016 5 次提交
  5. 03 3月, 2016 6 次提交
    • M
      Initialize couple of variables. · bde6e002
      Michal Privoznik 提交于
      While trying to build with -Os couple of compile errors showed
      up.
      
      conf/domain_conf.c: In function 'virDomainChrRemove':
      conf/domain_conf.c:13666:24: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           virDomainChrDefPtr ret, **arrPtr = NULL;
                              ^
      Compiler fails to see that @ret is used only if set in the loop,
      but whatever, there's no harm in initializing the variable.
      
      In vboxAttachDrivesNew and _vboxAttachDrivesOld compiler thinks
      that @rc may be used uninitialized. Well, not directly, but maybe
      after some optimization. Yet again, no harm in initializing a
      variable.
      
      In file included from ./util/virthread.h:26:0,
                       from ./datatypes.h:28,
                       from vbox/vbox_tmpl.c:43,
                       from vbox/vbox_V3_1.c:37:
      vbox/vbox_tmpl.c: In function '_vboxAttachDrivesOld':
      ./util/virerror.h:181:5: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           virReportErrorHelper(VIR_FROM_THIS, code, __FILE__,              \
           ^
      In file included from vbox/vbox_V3_1.c:37:0:
      vbox/vbox_tmpl.c:1041:14: note: 'rc' was declared here
           nsresult rc;
                    ^
      Yet again, one uninitialized variable:
      
      qemu/qemu_driver.c: In function 'qemuDomainBlockCommit':
      qemu/qemu_driver.c:17194:9: error: 'baseSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
               qemuDomainPrepareDiskChainElement(driver, vm, baseSource,
               ^
      
      And another one:
      
      storage/storage_backend_logical.c: In function 'virStorageBackendLogicalMatchPoolSource.isra.2':
      storage/storage_backend_logical.c:618:33: error: 'thisSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                             thisSource->devices[j].path))
                                       ^
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      bde6e002
    • M
      Drop inline keyword from some functions. · be8b536a
      Michal Privoznik 提交于
      While trying to build with -Os I've encountered some build
      failures.
      
      util/vircommand.c: In function 'virCommandAddEnvFormat':
      util/vircommand.c:1257:1: error: inlining failed in call to 'virCommandAddEnv': call is unlikely and code size would grow [-Werror=inline]
       virCommandAddEnv(virCommandPtr cmd, char *env)
       ^
      util/vircommand.c:1308:5: error: called from here [-Werror=inline]
           virCommandAddEnv(cmd, env);
           ^
      This function is big enough for the compiler to be not inlined.
      This is the error message I'm seeing:
      
      Then virDomainNumatuneNodeSpecified is exported and called from
      other places. It shouldn't be inlined then.
      
      In file included from network/bridge_driver_platform.h:30:0,
                       from network/bridge_driver_platform.c:26:
      network/bridge_driver_linux.c: In function 'networkRemoveRoutingFirewallRules':
      ./conf/network_conf.h:350:1: error: inlining failed in call to 'virNetworkDefForwardIf.constprop': call is unlikely and code size would grow [-Werror=inline]
       virNetworkDefForwardIf(const virNetworkDef *def, size_t n)
       ^
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      be8b536a
    • J
      qemu: Check if domain is active in GetControlInfo · e53f2dc8
      Jiri Denemark 提交于
      Reporting status of a control connection makes no sense for an inactive
      domain.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1281706Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      e53f2dc8
    • J
      Use correct LDFLAGS for leaseshelper · 1a0f076d
      Jiri Denemark 提交于
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      1a0f076d
    • N
      daemon: fixup refcounting in close callback handling · ce35122c
      Nikolay Shirokovskiy 提交于
      remoteDispatchConnectCloseCallbackRegister introduced in
      f484310a has problems. It refcounts network client object and in case of NOOP
      driver operations for registering/unregistering close callback (any driver
      except for vz) nobody will unref it later. As a result, client connection
      will not be disposed and driver connection will not be closed.
      
      The fix is easy. We don't need to refcount at all. We don't get a dangling
      pointer because in remoteClientFreeFunc, which is called
      upon disposing this network client object, we unregister the close
      callback.
      Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      ce35122c
    • J
      util: Cleanup error path for virPolkitAgentCreate · 0b36b0e9
      John Ferlan 提交于
      More fallout from changing to using virPolkitAgent and handling error
      paths.  Needed to clear the 'cmd' once stored and of course add the
      virCommandFree(cmd) in the error: label.
      0b36b0e9
  6. 02 3月, 2016 2 次提交
    • M
      datatypes.c: Replace 'close' with 'closeData' · f5f1ccbc
      Michal Privoznik 提交于
      Older compilers fail to see that 'close' is not used a function
      rather than a variable and produce the following error:
      
      cc1: warnings being treated as errors
      ../../src/datatypes.c: In function 'virConnectCloseCallbackDataReset':
      ../../src/datatypes.c:149: error: declaration of 'close' shadows a global declaration [-Wshadow]
      
      Replace all the 'close' occurrences with 'closeData' to resolve
      this.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f5f1ccbc
    • J
      util: Fix missing initializer for agent · 95aa1017
      John Ferlan 提交于
      In virPolkitAgentCreate neglected to initialize agent to NULL. If
      there was an error in the pipe, then we jump to error and would have
      an issue. Found by coverity.
      95aa1017