In theory, users might want to use a relative path as a root
directory for embed drivers. But in practice, nothing in driver
initialization (specifically QEMU driver since it's the only one
that supports embedding now), is prepared for that. Document and
enforce absolute paths.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1883725
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
registered & be running an instance of the event loop. To open
the driver in embedded mode the app use the new URI path and specify
a virtual root directory under which the driver will create content.
+ The path to the root directory must be absolute. Passing a relative
+ path results in an error.
</p>
<pre>
if (!root)
goto failed;
+ if (!g_path_is_absolute(root)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("root path must be absolute"));
+ goto failed;
+ }
+
if (virEventRequireImpl() < 0)
goto failed;