On Thu, Oct 20, 2022 at 16:58:53 -0500, Jonathon Jongsma wrote:
In future commits, we will optionally use nbdkit to serve some
remote
disk sources. This patch queries to see whether nbdkit is installed on
the host and queries it for capabilities. The data will be used in later
commits.
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
po/POTFILES | 1 +
src/qemu/meson.build | 1 +
src/qemu/qemu_conf.h | 1 +
src/qemu/qemu_nbdkit.c | 203 +++++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_nbdkit.h | 52 +++++++++++
5 files changed, 258 insertions(+)
create mode 100644 src/qemu/qemu_nbdkit.c
create mode 100644 src/qemu/qemu_nbdkit.h
Fails syntax-check:
stdout:
make: Entering directory '/home/pipo/build/libvirt/gcc/build-aux'
--- /home/pipo/libvirt/po/POTFILES
+++ /home/pipo/libvirt/po/POTFILES
@@ -178,7 +178,6 @@
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_text.c
src/qemu/qemu_namespace.c
-src/qemu/qemu_nbdkit.c
src/qemu/qemu_process.c
src/qemu/qemu_qapi.c
src/qemu/qemu_saveimage.c
make: Leaving directory '/home/pipo/build/libvirt/gcc/build-aux'
stderr:
you have changed the set of files with translatable diagnostics;
apply the above patch
make: *** [/home/pipo/libvirt/build-aux/syntax-check.mk:1248: sc_po_check] Error 1
diff --git a/po/POTFILES b/po/POTFILES
index 169e2a41dc..d96ce4415a 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -180,6 +180,7 @@ src/qemu/qemu_monitor.c
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_text.c
src/qemu/qemu_namespace.c
+src/qemu/qemu_nbdkit.c
src/qemu/qemu_process.c
src/qemu/qemu_qapi.c
src/qemu/qemu_saveimage.c
This hunk needs to go to a commit that actually adds translatable
strings.
diff --git a/src/qemu/meson.build b/src/qemu/meson.build
index 96952cc52d..101cf3591f 100644
--- a/src/qemu/meson.build
+++ b/src/qemu/meson.build
@@ -28,6 +28,7 @@ qemu_driver_sources = [
'qemu_monitor_json.c',
'qemu_monitor_text.c',
'qemu_namespace.c',
+ 'qemu_nbdkit.c',
'qemu_process.c',
'qemu_qapi.c',
'qemu_saveimage.c',
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index 8cf2dd2ec5..a39510b0b1 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -36,6 +36,7 @@
#include "virthreadpool.h"
#include "locking/lock_manager.h"
#include "qemu_capabilities.h"
+#include "qemu_nbdkit.h"
#include "virclosecallbacks.h"
#include "virhostdev.h"
#include "virfile.h"
And these ideally to the commit that makes use of the functions in this
file.
diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu/qemu_nbdkit.c
new file mode 100644
index 0000000000..7a7248c1ef
--- /dev/null
+++ b/src/qemu/qemu_nbdkit.c
@@ -0,0 +1,203 @@
+/*
+ * qemu_nbdkit.c: helpers for using nbdkit
+ *
+ * Copyright (C) 2021 Red Hat, Inc.
Also consider updating the year.
Once it passes the test suite:
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>