1. 31 1月, 2015 2 次提交
  2. 23 1月, 2015 1 次提交
  3. 15 10月, 2014 1 次提交
    • P
      util: json: Split out code to create json value objects · 881c4659
      Peter Krempa 提交于
      Our qemu monitor code has a converter from key-value pairs to a json
      value object. I want to re-use the code later and having it part of the
      monitor command generator is inflexible. Split it out into a separate
      helper.
      881c4659
  4. 17 6月, 2014 1 次提交
  5. 14 5月, 2013 1 次提交
    • E
      json: support removing a value from an object · 547a7c77
      Eric Blake 提交于
      In an upcoming patch, I need the way to safely transfer a nested
      virJSON object out of its parent container for independent use,
      even after the parent is freed.
      
      * src/util/virjson.h (virJSONValueObjectRemoveKey): New function.
      (_virJSONObject, _virJSONArray): Use correct type.
      * src/util/virjson.c (virJSONValueObjectRemoveKey): Implement it.
      * src/libvirt_private.syms (virjson.h): Export it.
      * tests/jsontest.c (mymain): Test it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      547a7c77
  6. 21 12月, 2012 1 次提交
  7. 21 9月, 2012 1 次提交
  8. 15 8月, 2012 1 次提交
  9. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  10. 03 5月, 2012 1 次提交
  11. 06 4月, 2012 1 次提交
    • E
      snapshot: fix memory leak on error · 14135609
      Eric Blake 提交于
      Leak introduced in commit 0436d328.  If we allocate an actions array,
      but fail early enough to never consume it with the qemu monitor
      transaction call, we leaked memory.
      
      But our semantics of making the transaction command free the caller's
      memory is awkward; avoiding the memory leak requires making every
      intermediate function in the call chain check for error.  It is much
      easier to fix things so that the function that allocates also frees,
      while the call chain leaves the caller's data intact.  To do that,
      I had to hack our JSON data structure to make it easy to protect a
      portion of an arbitrary JSON tree from being freed.
      
      * src/util/json.h (virJSONType): Name the enum.
      (_virJSONValue): New field.
      * src/util/json.c (virJSONValueFree): Use it to protect a portion
      of an array.
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONTransaction): Avoid
      freeing caller's data.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateDiskActive):
      Free actions array on failure.
      14135609
  12. 09 5月, 2011 1 次提交
  13. 10 3月, 2010 1 次提交
  14. 26 1月, 2010 1 次提交
    • D
      Misc fixes to QMP monitor support for QEMU · 2c7f5ca6
      Daniel P. Berrange 提交于
      * src/util/json.c, src/util/json.h: Declare returned strings
        to be const
      * src/qemu/qemu_monitor.c: Wire up JSON mode for qemuMonitorGetPtyPaths
      * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h: Fix
        const correctness. Add missing error message in the function
        qemuMonitorJSONGetAllPCIAddresses. Add implementation of the
        qemuMonitorGetPtyPaths function calling 'query-chardev'.
      2c7f5ca6
  15. 07 12月, 2009 1 次提交
    • D
      Introduce a simple API for handling JSON data · 9428f2ce
      Daniel P. Berrange 提交于
      This introduces simple API for handling JSON data. There is
      an internal data structure 'virJSONValuePtr' which stores a
      arbitrary nested JSON value (number, string, array, object,
      nul, etc).  There are APIs for constructing/querying objects
      and APIs for parsing/formatting string formatted JSON data.
      
      This uses the YAJL library for parsing/formatting from
      
       http://lloyd.github.com/yajl/
      
      * src/util/json.h, src/util/json.c: Data structures and APIs
        for representing JSON data, and parsing/formatting it
      * configure.in: Add check for yajl library
      * libvirt.spec.in: Add build requires for yajl
      * src/Makefile.am: Add json.c/h
      * src/libvirt_private.syms: Export JSON symbols to drivers
      9428f2ce