1. 19 6月, 2019 1 次提交
  2. 10 4月, 2019 2 次提交
  3. 03 4月, 2019 1 次提交
  4. 08 2月, 2019 1 次提交
  5. 25 1月, 2019 1 次提交
  6. 14 12月, 2018 2 次提交
  7. 13 8月, 2018 1 次提交
  8. 18 7月, 2018 1 次提交
  9. 14 7月, 2018 1 次提交
  10. 11 5月, 2018 1 次提交
    • J
      util: Clean up consumers of virJSONValueArraySize · 4a3d6ed5
      John Ferlan 提交于
      Rather than have virJSONValueArraySize return a -1 when the input
      is not an array and then splat an error message, let's check for
      an array before calling and then change the return to be a size_t
      instead of ssize_t.
      
      That means using the helper virJSONValueIsArray as well as using a
      more generic error message such as "Malformed <something> array".
      In some cases we can remove stack variables and when we cannot,
      those variables should be size_t not ssize_t. Alter a few references
      of if (!value) to be if (value == 0) instead as well.
      
      Some callers can already assume an array is being worked on based
      on the previous call, so there's less to do.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      4a3d6ed5
  11. 17 4月, 2018 1 次提交
  12. 03 4月, 2018 2 次提交
  13. 23 3月, 2018 1 次提交
  14. 31 1月, 2018 1 次提交
  15. 11 7月, 2017 2 次提交
  16. 27 3月, 2017 1 次提交
  17. 18 1月, 2017 1 次提交
  18. 14 12月, 2016 1 次提交
  19. 09 11月, 2016 1 次提交
  20. 05 10月, 2016 1 次提交
    • J
      util: Introduce virJSONValueObjectStealArray · ebf8b783
      John Ferlan 提交于
      Provide the Steal API for any code paths that will desire to grab the
      object array and then free it afterwards rather than relying to freeing
      the whole chain from the reply.
      ebf8b783
  21. 27 7月, 2016 2 次提交
  22. 09 10月, 2015 1 次提交
    • M
      virJSONValueArraySize: return ssize_t · 4f77c48c
      Michal Privoznik 提交于
      The internal representation of a JSON array counts the items in
      size_t. However, for some reason, when asking for the count it's
      reported as int. Firstly, we need the function to return a signed
      type as it's returning -1 on an error. But, not every system has
      integer the same size as size_t. Therefore, lets return ssize_t.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      4f77c48c
  23. 23 6月, 2015 1 次提交
    • E
      json: make it easier to type-check when getting from object · 58fd6703
      Eric Blake 提交于
      While working in qemu_monitor_json, I repeatedly found myself
      getting a value then checking if it was an object.  Add some
      wrappers to make this task easier.
      
      * src/util/virjson.c (virJSONValueObjectGetByType)
      (virJSONValueObjectGetObject, virJSONValueObjectGetArray): New
      functions.
      (virJSONValueObjectGetString, virJSONValueObjectGetNumberInt)
      (virJSONValueObjectGetNumberUint)
      (virJSONValueObjectGetNumberLong)
      (virJSONValueObjectGetNumberUlong)
      (virJSONValueObjectGetNumberDouble)
      (virJSONValueObjectGetBoolean): Simplify.
      (virJSONValueIsNull): Change return type.
      * src/util/virjson.h: Reflect changes.
      * src/libvirt_private.syms (virjson.h): Export them.
      * tests/jsontest.c (testJSONLookup): New test.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      58fd6703
  24. 11 6月, 2015 1 次提交
  25. 31 1月, 2015 3 次提交
  26. 23 1月, 2015 1 次提交
  27. 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
  28. 17 6月, 2014 1 次提交
  29. 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
  30. 21 12月, 2012 1 次提交
  31. 21 9月, 2012 1 次提交
  32. 15 8月, 2012 1 次提交
  33. 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