On Mon, Apr 06, 2026 at 18:16:53 -0400, Cole Robinson via Devel wrote:
> Move all all driver directory creation and permission handling
> from qemuStateInitialize to its own function. This is just code
> movement
>
> Signed-off-by: Cole Robinson <[email protected]>
> ---
> src/qemu/qemu_driver.c | 299 ++++++++++++++++++++++-------------------
> 1 file changed, 158 insertions(+), 141 deletions(-)
>
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 861795724a..b9f5e976b2 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
[...]
> @@ -830,7 +698,161 @@ qemuStateInitialize(bool privileged,
> (int)cfg->group);
> goto error;
> }
> + }
>
> + if (privileged &&
> + virFileUpdatePerm(cfg->memoryBackingDir,
> + 0, S_IXGRP | S_IXOTH) < 0)
> + goto error;
> +
> + ret = 0;
> +error:
235/314 libvirt:syntax-check / require_space_before_label
FAIL 0.09s exit status 2
>>> ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1
>>> MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1
>>> MESON_TEST_ITERATION=1 MALLOC_PERTURB_=82
>>> UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1
>>> /bin/make -C /home/pipo/build/libvirt/gcc/build-aux
>>> sc_require_space_before_label
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
✀
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stdout:
make: Entering directory '/home/pipo/build/libvirt/gcc/build-aux'
/home/pipo/libvirt/src/qemu/qemu_driver.c:709:error:
make: Leaving directory '/home/pipo/build/libvirt/gcc/build-aux'
stderr:
Top-level labels should be indented by one space
make: *** [/home/pipo/libvirt/build-aux/syntax-check.mk:720:
sc_require_space_before_label] Error 1
> + return ret;
With syntax-check fixed:
Reviewed-by: Peter Krempa <[email protected]>