]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
virSecurityManagerNew: Turn array of booleans into flags
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 6 Oct 2015 15:01:48 +0000 (17:01 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 7 Oct 2015 15:51:28 +0000 (17:51 +0200)
commit79bd55b3024a5d8695880b2a992b8a365bbb5b39
tree45bdb164df080dee440c54263c2ed3a932a4b8da
parenta946c50ded37bccab831c75d2969ee82cc8c4ad5
virSecurityManagerNew: Turn array of booleans into flags

So imagine you want to crate new security manager:

  if (!(mgr = virSecurityManagerNew("selinux", "QEMU", false, true, false, true)));

Hard to parse, right? What about this:

  if (!(mgr = virSecurityManagerNew("selinux", "QEMU",
                                    VIR_SECURITY_MANAGER_DEFAULT_CONFINED |
                                    VIR_SECURITY_MANAGER_PRIVILEGED)));

Now that's better! This is what the commit does.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/lxc/lxc_controller.c
src/lxc/lxc_driver.c
src/qemu/qemu_driver.c
src/security/security_manager.c
src/security/security_manager.h
tests/qemuhotplugtest.c
tests/seclabeltest.c
tests/securityselinuxlabeltest.c
tests/securityselinuxtest.c