1. 21 5月, 2013 21 次提交
    • D
      Convert Xen domain create/define/getxml/migration APIs to use virDomainDefPtr · 18b14012
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain create, migrate,
      getxml, & define APIs to simplify introduction of ACL security
      checks. The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      18b14012
    • D
      Convert Xen domain managed save driver methods to use virDomainDefPtr · 0a6fc8ab
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain save
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0a6fc8ab
    • D
      Convert Xen domain property driver methods to use virDomainDefPtr · 249fbea0
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain property
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      249fbea0
    • D
      Convert Xen domain lifecycle driver methods to use virDomainDefPtr · f547c520
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain lifecycle
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f547c520
    • D
      Convert Xen domain lookup driver methods to use virDomainDefPtr · 5ed5783b
      Daniel P. Berrange 提交于
      Introduce use of a virDomainDefPtr in the domain lookup
      APIs to simplify introduction of ACL security checks.
      The virDomainPtr cannot be safely used, since the app
      may have supplied mis-matching name/uuid/id fields. eg
      the name points to domain X, while the uuid points to
      domain Y. Resolving the virDomainPtr to a virDomainDefPtr
      ensures a consistent name/uuid/id set.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      5ed5783b
    • O
      qemu: Don't remove the "return 0" · 58f8e0cd
      Osier Yang 提交于
      Commit f60a50c7 intended to remove the warning only, but not with
      the "return 0" together.
      58f8e0cd
    • J
      shunloadtest: Resolve Coverity CHECKED_RETURN error · 995bf76d
      John Ferlan 提交于
      The shunloadStart function didn't check the status of virInitialize which
      was flagged by Coverity.  Adjust the function and shunloadtest in order
      to handle the situation.
      995bf76d
    • J
      xencapstest: Resolve Coverity CHECKED_RETURN error · 01757a46
      John Ferlan 提交于
      The return from virInitialize() needs to be checked.
      01757a46
    • G
      qemu: fix a typo in qemuAddSharedDevice · ceae7460
      Guannan Ren 提交于
      ceae7460
    • J
      docs: formatdomain: fix links in the table of contents · 41c89669
      Ján Tomko 提交于
      41c89669
    • M
      qemuDomainChangeEjectableMedia: Unlock domain while waiting for event · 543af79a
      Michal Privoznik 提交于
      In 84c59ffa I've tried to fix changing ejectable media process. The
      process should go like this:
      
      1) we need to call 'eject' on the monitor
      2) we should wait for 'DEVICE_TRAY_MOVED' event
      3) now we can issue 'change' command
      
      However, while waiting in step 2) the domain monitor was locked. So
      even if qemu reported the desired event, the proper callback was not
      called immediately. The monitor handling code needs to lock the
      monitor in order to read the event. So that's the first lock we must
      not hold while waiting. The second one is the domain lock. When
      monitor handling code reads an event, the appropriate callback is
      called then. The first thing that each callback does is locking the
      corresponding domain as a domain or its device is about to change
      state. So we need to unlock both monitor and VM lock. Well, holding
      any lock while sleep()-ing is not the best thing to do anyway.
      543af79a
    • M
    • M
      vmware: Restore OOM error reporting in vmwareCopyVMXFileName · 63a2e0b2
      Matthias Bolte 提交于
      Got lost in commit e6ab1009.
      63a2e0b2
    • E
      maint: enforce correct copyright usage · 0e55024e
      Eric Blake 提交于
      To ensure we don't regress and cause the need for further
      cleanups, add a 'make syntax-check' rule that ensures new
      files have proper copyright contents.
      
      * cfg.mk (sc_copyright_address): Rename...
      (sc_copyright_usage): ...and enhance.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      0e55024e
    • E
      maint: refer to correct license file · 043af8ac
      Eric Blake 提交于
      Now that COPYING no longer contains the text of the LGPL,
      modify the LGPLv2-only files from vbox to call out the
      correct file.
      
      * src/vbox/vbox_CAPI_v2_2.h: Refer to correct file.
      * src/vbox/vbox_CAPI_v3_0.h: Likewise.
      * src/vbox/vbox_CAPI_v3_1.h: Likewise.
      * src/vbox/vbox_CAPI_v3_2.h: Likewise.
      * src/vbox/vbox_CAPI_v4_0.h: Likewise.
      * src/vbox/vbox_CAPI_v4_1.h: Likewise.
      * src/vbox/vbox_V2_2.c: Likewise.
      * src/vbox/vbox_V3_0.c: Likewise.
      * src/vbox/vbox_V3_1.c: Likewise.
      * src/vbox/vbox_XPCOMCGlue.c: Likewise.
      * src/vbox/vbox_XPCOMCGlue.h: Likewise.
      * src/vbox/vbox_driver.c: Likewise.
      * src/vbox/vbox_driver.h: Likewise.
      * src/vbox/vbox_tmpl.c: Likewise.
      * src/vbox/vbox_V3_2.c: Copy license notice from vbox_V3_1.c.
      * src/vbox/vbox_V4_0.c: Likewise.
      * src/vbox/vbox_V4_1.c: Likewise.
      * src/vbox/README: Mention copyright issues; this particular
      file contains no code and therefore does not need LGPL.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      043af8ac
    • E
      maint: follow recommended practice for using LGPL · de483052
      Eric Blake 提交于
      https://www.gnu.org/licenses/gpl-howto.html states:
      
      You should also include a copy of the license itself somewhere in the
      distribution of your program. All programs, whether they are released
      under the GPL or LGPL, should include the text version of the GPL. In
      GNU programs the license is usually in a file called COPYING.
      
      If you are releasing your program under the LGPL, you should also
      include the text version of the LGPL, usually in a file called
      COPYING.LESSER. Please note that, since the LGPL is a set of
      additional permissions on top of the GPL, it's important to include
      both licenses so users have all the materials they need to understand
      their rights.
      
      * configure.ac (COPYING): No more games with non-git file.
      * COPYING: New file, copied from gnulib.
      * COPYING.LIB: Rename...
      * COPYING.LESSER: ...to this.
      * .gitignore: Track licenses in git.
      * cfg.mk (exclude_file_name_regexp--sc_copyright_address): Tweak
      rule.
      * libvirt.spec.in (daemon, client, python): Reflect rename.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      de483052
    • E
      maint: use LGPL correctly · d7f53c7b
      Eric Blake 提交于
      Several files called out COPYING or COPYING.LIB instead of using
      the normal boilerplate.  It's especially important that we don't
      call out COPYING from an LGPL file, since COPYING is traditionally
      used for the GPL.  A few files were lacking copyright altogether.
      
      * src/rpc/gendispatch.pl: Add missing copyright.
      * Makefile.nonreentrant: Likewise.
      * src/check-symfile.pl: Likewise.
      * src/check-symsorting.pl: Likewise.
      * src/driver.h: Likewise.
      * src/internal.h: Likewise.
      * tools/libvirt-guests.sh.in: Likewise.
      * tools/virt-pki-validate.in: Mention copyright in comment, not just code.
      * tools/virt-sanlock-cleanup.in: Likewise.
      * src/rpc/genprotocol.pl: Spell out license terms.
      * src/xen/xend_internal.h: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * Makefile.am: Likewise.
      * daemon/Makefile.am: Likewise.
      * docs/Makefile.am: Likewise.
      * docs/schemas/Makefile.am: Likewise.
      * examples/apparmor/Makefile.am: Likewise.
      * examples/domain-events/events-c/Makefile.am: Likewise.
      * examples/dominfo/Makefile.am: Likewise.
      * examples/domsuspend/Makefile.am: Likewise.
      * examples/hellolibvirt/Makefile.am: Likewise.
      * examples/openauth/Makefile.am: Likewise.
      * examples/python/Makefile.am: Likewise.
      * examples/systemtap/Makefile.am: Likewise.
      * examples/xml/nwfilter/Makefile.am: Likewise.
      * gnulib/lib/Makefile.am: Likewise.
      * gnulib/tests/Makefile.am: Likewise.
      * include/Makefile.am: Likewise.
      * include/libvirt/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * python/tests/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      * tools/Makefile.am: Likewise.
      * configure.ac: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d7f53c7b
    • G
      LXC: move the comments to the proper place · 7adfda0d
      Gao feng 提交于
      The comments is for virLXCControllerSetupPrivateNS.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      7adfda0d
    • G
      LXC: fix memory leak in virLXCControllerSetupDevPTS · 2a3466fa
      Gao feng 提交于
      We forgot to free the mount_options.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      2a3466fa
    • G
      LXC: remove unnecessary check on root filesystem · eae1c286
      Gao feng 提交于
      After commit c131525b
      "Auto-add a root <filesystem> element to LXC containers on startup"
      for libvirt lxc, root must be existent.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      eae1c286
    • M
      openvzDomainSetNetwork: use virCommand · d8b31306
      Michal Privoznik 提交于
      Currently, the openvzDomainSetNetwork function constructs an
      array of strings representing a command line for VZCTL binary.
      This is a overkill since our virCommand APIs can cover all the
      functionality. Moreover, the function is not following our
      structure where return value is set to -1 initially, and after
      all operations succeeded then it is set to zero.
      d8b31306
  2. 20 5月, 2013 8 次提交
    • O
      qemu: Add callback struct for qemuBuildCommandLine · 3a6204cb
      Osier Yang 提交于
      Since 0d70656a, it starts to access the sysfs files to build
      the qemu command line (by virSCSIDeviceGetSgName, which is to find
      out the scsi generic device name by adpater:bus:target:unit), there
      is no way to work around, qemu wants to see the scsi generic device
      like "/dev/sg6" anyway.
      
      And there might be other places which need to access sysfs files
      when building qemu command line in future.
      
      Instead of increasing the arguments of qemuBuildCommandLine, this
      introduces a new callback for qemuBuildCommandLine, and thus tests
      can register their own callbacks for sysfs test input files accessing.
      
      * src/qemu/qemu_command.h: (New callback struct
                                  qemuBuildCommandLineCallbacks;
                                  extern buildCommandLineCallbacks)
      * src/qemu/qemu_command.c: (wire up the callback struct)
      * src/qemu/qemu_driver.c: (Use the new syntax of qemuBuildCommandLine)
      * src/qemu/qemu_hotplug.c: Likewise
      * src/qemu/qemu_process.c: Likewise
      * tests/testutilsqemu.[ch]: (Helper testSCSIDeviceGetSgName;
                                   callback struct testCallbacks;)
      * tests/qemuxml2argvtest.c: (Use testCallbacks)
      * src/tests/qemuxmlnstest.c: (Like above)
      3a6204cb
    • O
      storage_conf: Improve the coding style in storage_conf.h · 8b7b43a1
      Osier Yang 提交于
      Changes:
        * Remove useless comments
        * Remove useless blank lines
        * If the struct member is a enum type, comment it like
          /* enum fooBar */
        * Break the long lines
        * Prefer the common function style for the inline function
      8b7b43a1
    • O
      storage_conf: Fix indentions in storage_conf.c · 76359ee5
      Osier Yang 提交于
      Uses the 4 spaces for indention.
      76359ee5
    • O
      storage_conf: Fix the coding stype in storage_conf.c · c8a3cf89
      Osier Yang 提交于
      Changes:
        * Remove the useless space in "for" statement (e.g.
          for (i = 0 ; i < something ; i++)
      
        * Change the function's style to:
          void
          foo(bar)
          {
              printf("foo is not bar\n");
          }
      
        * Don't lose "{}" for "if...else" branches if one of the branch
          has more than one line block. Example of the old ones:
          if (a) {
              printf("a is not funny");
          } else
              printf("a is funny");
      
        * Remove the 1 space before "goto" label.
      
        * Remove the useless blank line(s)
      
        * Add blank line if it can make the code more clear to eyes.
      c8a3cf89
    • O
      479d5991
    • O
      9f2455d3
    • O
      f60a50c7
    • O
      2fd16df7
  3. 18 5月, 2013 5 次提交
  4. 17 5月, 2013 6 次提交