1. 19 3月, 2016 1 次提交
  2. 12 2月, 2016 1 次提交
  3. 11 2月, 2016 1 次提交
    • J
      Prohibit verbose strcat · 28e5655d
      Ján Tomko 提交于
      Using strcat directly is more readable than passing strlen
      of the copied string to strncat.
      28e5655d
  4. 03 2月, 2016 1 次提交
    • E
      cfg.mk: Adjust sc_prohibit_int_ijk to support 'exempt from syntax-check' · 1fe6d8bf
      Erik Skultety 提交于
      There might be cases, like with typed params, where triggering this check isn't
      desirable. But including the whole module in the exception regex is not always
      to right way of doing things. By adding an option to manually disable this check
      on a specific occurrence, the module itself will still be checked against the
      rule.
      1fe6d8bf
  5. 10 1月, 2016 1 次提交
  6. 30 11月, 2015 1 次提交
    • E
      libvirt: introduce libvirt/libvirt-common.h.in · a20b6237
      Erik Skultety 提交于
      As it turned out, we need to share some enums and declarations between
      libvirt.h and libvirt-admin.h, but since our policy forbids direct includes of
      libvirt*.h, there has to be some header exempt from this rule. This patch moves
      the relevant part of code from libvirt.h.in to libvirt-common.h.in. Moreover,
      since there is no need to have libvirt.h generated anymore, introduce a new
      header libvirt.h which was previosly ignored from git and make the common
      header ignored and generated instead.
      a20b6237
  7. 26 11月, 2015 2 次提交
    • D
      qemu: add support for sending QEMU stdout/stderr to virtlogd · 0d968ad7
      Daniel P. Berrange 提交于
      Currently the QEMU stdout/stderr streams are written directly to
      a regular file (eg /var/log/libvirt/qemu/$GUEST.log). While those
      can be rotated by logrotate (using copytruncate option) this is
      not very efficient. It also leaves open a window of opportunity
      for a compromised/broken QEMU to DOS the host filesystem by
      writing lots of text to stdout/stderr.
      
      This makes it possible to connect the stdout/stderr file handles
      to a pipe that is provided by virtlogd. The virtlogd daemon will
      read from this pipe and write data to the log file, performing
      file rotation whenever a pre-determined size limit is reached.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0d968ad7
    • D
      Import stripped down virtlockd code as basis of virtlogd · 323a329b
      Daniel P. Berrange 提交于
      Copy the virtlockd codebase across to form the initial virlogd
      code. Simple search & replace of s/lock/log/ and gut the remote
      protocol & dispatcher. This gives us a daemon that starts up
      and listens for connections, but does nothing with them.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      323a329b
  8. 17 11月, 2015 1 次提交
  9. 09 11月, 2015 1 次提交
    • D
      tests: redo test argv file line wrapping · 8afd34f2
      Daniel P. Berrange 提交于
      Back in
      
        commit bd6c46fa
        Author: Juerg Haefliger <juerg.haefliger@hp.com>
        Date:   Mon Jan 31 06:42:57 2011 -0500
      
          tests: handle backspace-newline pairs in test input files
      
      all the test argv files were line wrapped so that the args
      were less than 80 characters.
      
      The way the line wrapping was done turns out to be quite
      undesirable, because it often leaves multiple parameters
      on the same line. If we later need to add or remove
      individual parameters, then it leaves us having to redo
      line wrapping.
      
      This commit changes the line wrapping so that every
      single "-param value" is one its own new line. If the
      "value" is still too long, then we break on ',' or ':'
      or ' ' as needed.
      
      This means that when we come to add / remove parameters
      from the test files line, the patch diffs will only
      ever show a single line added/removed which will greatly
      simplify review work.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      8afd34f2
  10. 21 10月, 2015 1 次提交
  11. 20 10月, 2015 1 次提交
  12. 14 8月, 2015 1 次提交
    • E
      tools: Introduce new client generic module vsh · 834c5720
      Erik Skultety 提交于
      In order to share as much virsh' logic as possible with upcomming
      virt-admin client we need to split virsh logic into virsh specific and
      client generic features.
      
      Since majority of virsh methods should be generic enough to be used by
      other clients, it's much easier to rename virsh specific data to virshX
      than doing this vice versa. It moved generic virsh commands (including info
      and opts structures) to generic module vsh.c.
      
      Besides renaming methods and structures, this patch also involves introduction
      of a client specific control structure being referenced as private data in the
      original control structure, introduction of a new global vsh Initializer,
      which currently doesn't do much, but there is a potential for added
      functionality in the future.
      Lastly it introduced client hooks which are especially necessary during
      client connecting phase.
      834c5720
  13. 16 6月, 2015 3 次提交
  14. 13 5月, 2015 1 次提交
    • M
      Fix build --without-network · 564dd537
      Martin Kletzander 提交于
      In order not to bring in any link dependencies, bridge driver doesn't
      use the usual stubs as other conditionally-built code does.  However,
      having the function as a macro imposes a problem with possibly unused
      variables if just defined as "0".  This was worked around by using
      (dom=dom, iface=iface, 0) which should act like a 0 if used in a
      condition.  However, gcc still bugs about that, so I came up with
      another way how to fix that.
      
      Using static inline functions in the header won't collide with anything,
      it fixes the bug and does one thing that the macro didn't do.  It checks
      whenther passed variables are pointers of compatible type.  It has only
      one downside, and that is that we need to either a) define it with
      ATTRIBUTE_UNUSED, which needs an exception in cfg.mk or b) do something
      like ignore_value(variable); in the function body.  I went with the
      first variant.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      564dd537
  15. 14 4月, 2015 1 次提交
  16. 01 4月, 2015 1 次提交
  17. 25 3月, 2015 1 次提交
  18. 11 3月, 2015 1 次提交
  19. 09 3月, 2015 1 次提交
  20. 03 2月, 2015 1 次提交
  21. 23 1月, 2015 1 次提交
    • J
      Fix virCgroupGetPercpuStats with non-continuous present CPUs · af1c98e4
      Ján Tomko 提交于
      Per-cpu stats are only shown for present CPUs in the cgroups,
      but we were only parsing the largest CPU number from
      /sys/devices/system/cpu/present and looking for stats even for
      non-present CPUs.
      This resulted in:
      internal error: cpuacct parse error
      af1c98e4
  22. 13 1月, 2015 1 次提交
  23. 04 1月, 2015 1 次提交
    • K
      src/xenconfig: Xen-xl parser · 2c78051a
      Kiarie Kahurani 提交于
      Introduce a Xen xl parser
      
      This parser allows for users to convert the new xl disk format and
      spice graphics config to libvirt xml format and vice versa. Regarding
      the spice graphics config, the code is pretty much straight forward.
      For the disk {formating, parsing}, this parser takes care of the new
      xl format which include positional parameters and key/value parameters.
      In xl format disk config a <diskspec> consists of parameters separated by
      commas. If the parameters do not contain an '=' they are automatically
      assigned to certain options following the order below
      
         target, format, vdev, access
      
      The above are the only mandatory parameters in the <diskspec> but there
      are many more disk config options. These options can be specified as
      key=value pairs. This takes care of the rest of the options such as
      
        devtype, backend, backendtype, script, direct-io-safe,
      
      The positional paramters can also be specified in key/value form
      for example
      
          /dev/vg/guest-volume,,hda
          /dev/vg/guest-volume,raw,hda,rw
          format=raw, vdev=hda, access=rw, target=/dev/vg/guest-volume
      
      are interpleted to one config.
      
      In xm format, the above diskspec would be written as
      
      phy:/dev/vg/guest-volume,hda,w
      
      The disk parser is based on the same parser used successfully by
      the Xen project for several years now.  Ian Jackson authored the
      scanner, which is used by this commit with mimimal changes.  Only
      the PREFIX option is changed, to produce function and file names
      more consistent with libvirt's convention.
      Signed-off-by: NKiarie Kahurani <davidkiarie4@gmail.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      2c78051a
  24. 03 12月, 2014 10 次提交
    • J
      Replace virDomainSnapshotFree with virObjectUnref · c8230c4d
      John Ferlan 提交于
      Since virDomainSnapshotFree will call virObjectUnref anyway, let's just use
      that directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      c8230c4d
    • J
      Replace virInterfaceFree with virObjectUnref · c56a591a
      John Ferlan 提交于
      Since virInterfaceFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      c56a591a
    • J
      Replace virNWFilterFree with virObjectUnref · 7b4938f5
      John Ferlan 提交于
      Since virNWFilterFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      7b4938f5
    • J
      Replace virSecretFree with virObjectUnref · a0b13d35
      John Ferlan 提交于
      Since virSecretFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      a0b13d35
    • J
      Replace virStreamFree with virObjectUnref · 1725a468
      John Ferlan 提交于
      Since virStreamFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      1725a468
    • J
      Replace virStoragePoolFree with virObjectUnref · adbbff5f
      John Ferlan 提交于
      Since virStoragePoolFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      adbbff5f
    • J
      Replace virStorageVolFree with virObjectUnref · d1219054
      John Ferlan 提交于
      Since virStorageVolFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      d1219054
    • J
      Replace virNodeDeviceFree with virObjectUnref · e3b456de
      John Ferlan 提交于
      Since virNodeDeviceFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      e3b456de
    • J
      Replace virNetworkFree with virObjectUnref · 121c09a9
      John Ferlan 提交于
      Since virNetworkFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      121c09a9
    • J
      Replace virDomainFree with virObjectUnref · 8fb3aee2
      John Ferlan 提交于
      Since virDomainFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      8fb3aee2
  25. 28 11月, 2014 1 次提交
    • J
      Fix usage of virReportSystemError · 9340528a
      Jiri Denemark 提交于
      virReportSystemError is reserved for reporting system errors, calling it
      with VIR_ERR_* error codes produces error messages that do not make any
      sense, such as
      
          internal error: guest failed to start: Kernel doesn't support user
          namespace: Link has been severed
      
      We should prohibit wrong usage with a syntax-check rule.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      9340528a
  26. 24 11月, 2014 1 次提交
    • J
      spec: Automatically apply all patches with git · 1fd83607
      Jiri Denemark 提交于
      With this change, any patch declared in libvirt.spec with Patch[0-9]* is
      automatically applied in %prep. Unlike with the standard %patch[0-9]*,
      patches are applied with "git am" to avoid some unexpected results.
      However, as a result of this, all patches must be in the right format
      for "git am" to be able to apply them; they should ideally be generated
      from git using "git format-patch".
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      1fd83607
  27. 19 11月, 2014 1 次提交
    • 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
  28. 15 11月, 2014 1 次提交