1. 20 11月, 2014 10 次提交
  2. 19 11月, 2014 7 次提交
    • E
      maint: forbid 'int foo = true' · eb909376
      Eric Blake 提交于
      I noticed this while working on qemuDomainGetBlockInfo.  Assigning
      a bool value to an int variable compiles fine, but raises red flags
      on the maintenance front as it becomes too easy to assign -1 or 2
      or any other non-bool value to the same variable.
      
      * cfg.mk (sc_prohibit_int_assign_bool): New rule.
      * src/conf/snapshot_conf.c (virDomainSnapshotRedefinePrep): Fix
      offenders.
      * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo)
      (qemuDomainSnapshotCreateXML): Likewise.
      * src/test/test_driver.c (testDomainSnapshotAlignDisks):
      Likewise.
      * src/util/vircgroup.c (virCgroupSupportsCpuBW): Likewise.
      * src/util/virpci.c (virPCIDeviceBindToStub): Likewise.
      * src/util/virutil.c (virIsCapableVport): Likewise.
      * tools/virsh-domain-monitor.c (cmdDomMemStat): Likewise.
      * tools/virsh-domain.c (cmdBlockResize, cmdScreenshot)
      (cmdInjectNMI, cmdSendKey, cmdSendProcessSignal)
      (cmdDetachInterface): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      eb909376
    • E
      virdbus: don't force users to pass int for bool values · 2aa167ca
      Eric Blake 提交于
      Use of an 'int' to represent a 'bool' value is confusing.  Just
      because dbus made the mistake of cementing their 4-byte wire
      format of dbus_bool_t into their API doesn't mean we have to
      repeat the mistake.  With a little bit of finesse, we can
      guarantee that we provide a large-enough value to the DBus
      code, while still copying only the relevant one-byte bool
      to the client code, and isolate the rest of our code base from
      the DBus stupidity.
      
      * src/util/virdbus.c (GET_NEXT_VAL): Add parameter.
      (virDBusMessageIterDecode): Adjust all clients.
      * src/util/virpolkit.c (virPolkitCheckAuth): Use nicer type.
      * tests/virdbustest.c (testMessageSimple, testMessageStruct):
      Test new behavior.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      2aa167ca
    • C
      bac66a60
    • Y
      vbox: fix a bug in _machineStateInactive · 9b7e7e34
      Yohan BELLEGUIC 提交于
      This function returned non-inactive domains instead of active
      domains.  This broke virConnectNumOfDefinedDomains() and
      virConnectListDefinedDomains() functions.
      9b7e7e34
    • A
      network: Add network bandwidth support to ethernet interfaces · 22cff52a
      Anirban Chakraborty 提交于
      Ethernet interfaces in libvirt currently do not support bandwidth setting.
      For example, following xml file for an interface will not apply these
      settings to corresponding qdiscs.
      
          <interface type="ethernet">
            <mac address="02:36:1d:18:2a:e4"/>
            <model type="virtio"/>
            <script path=""/>
            <target dev="tap361d182a-e4"/>
            <bandwidth>
              <inbound average="984" peak="1024" burst="64"/>
              <outbound average="2000" peak="2048" burst="128"/>
            </bandwidth>
          </interface>
      Signed-off-by: NAnirban Chakraborty <abchak@juniper.net>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      22cff52a
    • M
      docs: Document NVRAM behavior on transient domains · 401702d9
      Michal Privoznik 提交于
      Since 1.2.8 it's possible to use OVMF on domains. Moreover, it's
      possible to have libvirt create NVRAM file per domain. Later,
      when domain is undefined, the file is removed too. However,
      things are a bit complicated when domain's transient. There's no
      undefine to transient domains. There are two options: 1) leave
      the file behind and let mgmt app remove it. 2) remove it
      automatically as domain dies.
      But, in some scenarios mgmt app may want to preserve the file,
      copy it somewhere safe, and then copy it back when the domain is
      starting again. And this wouldn't be possible with case 2). So,
      even though case 1) leaves some files behind (possibly undeleted
      for a long time), the files themselves are small (128K each). And
      data loss is worse than full disk, isn't it?
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      401702d9
    • D
      Remove left over debug in hvsupport.pl script · 6c79469c
      Daniel P. Berrange 提交于
      6c79469c
  3. 15 11月, 2014 23 次提交