[PATCH 00/16] Add typedef accessors for virConf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Every caller of virConfGetValue is doing the same kind of
dance to ensure the returned value is set and has the
right kind of type. This is a clear sign we should have
typesafe APIs for accessor virConf values.

This series introduces such APIs and converts much of
the code. What is not converted is src/lxc/lxc_native.c,
src/vmx/vmx.c, src/xenconfig/xen_common.c and
src/xenconfig/xen_xl.c. These are left as an exercise
for someone else.

Daniel P. Berrange (16):
  tests: remove pointless virconftest.sh wrapper
  virconf: fix off-by-1 when appending \n to config file
  virconf: add typed value accessor methods
  libvirtd: convert to typesafe virConf accessors
  qemu: convert to typesafe virConf accessors
  libvirt: convert to typesafe virConf accessors
  virtlockd: convert to typesafe virConf accessors
  virtlogd: convert to typedef virConf accessors
  lxc: convert to typesafe virConf accessors
  libxl: convert to typesafe virConf accessors
  uri: convert to typesafe virConf accessors
  virt-login-shell: convert to typesafe virConf accessors
  selinux: convert to typesafe virConf accessors
  lockd: convert to typesafe virConf accessors
  sanlock: convert to typesafe virConf accessors
  remote: convert to typesafe virConf accessors

 daemon/libvirtd-config.c          | 306 ++++++++---------------
 daemon/libvirtd-config.h          |  42 ++--
 po/POTFILES.in                    |   2 -
 src/libvirt-admin.c               |  66 ++---
 src/libvirt.c                     |  70 +++---
 src/libvirt_private.syms          |  10 +
 src/libxl/libxl_conf.c            |  53 +---
 src/locking/lock_daemon_config.c  |  90 +------
 src/locking/lock_daemon_config.h  |   9 +-
 src/locking/lock_driver_lockd.c   |  61 ++---
 src/locking/lock_driver_sanlock.c |  97 +++-----
 src/logging/log_daemon_config.c   |  96 +-------
 src/logging/log_daemon_config.h   |   7 +-
 src/lxc/lxc_conf.c                |  49 ++--
 src/lxc/lxc_conf.h                |   2 +-
 src/qemu/qemu_conf.c              | 395 ++++++++++++------------------
 src/qemu/qemu_conf.h              |  20 +-
 src/remote/remote_driver.c        |  15 +-
 src/security/security_selinux.c   |  42 ++--
 src/util/virconf.c                | 502 +++++++++++++++++++++++++++++++++++++-
 src/util/virconf.h                |  34 ++-
 src/util/viruri.c                 |  48 ++--
 tests/Makefile.am                 |  19 +-
 tests/libvirtdconftest.c          | 245 -------------------
 tests/virconftest.c               | 411 ++++++++++++++++++++++++++++++-
 tests/virconftest.sh              |  26 --
 tools/virt-login-shell.c          | 141 +++--------
 27 files changed, 1488 insertions(+), 1370 deletions(-)
 delete mode 100644 tests/libvirtdconftest.c
 delete mode 100755 tests/virconftest.sh

-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux