mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu: virtiofs: check whether the supplied binary exists
Report an error upfront if the binary does not exist or is not executable. https://bugzilla.redhat.com/show_bug.cgi?id=1999372 Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
baa779ea9c
commit
459f8009c2
@ -184,6 +184,13 @@ qemuVirtioFSStart(virQEMUDriver *driver,
|
||||
VIR_AUTOCLOSE logfd = -1;
|
||||
int rc;
|
||||
|
||||
if (!virFileIsExecutable(fs->binary)) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("virtiofsd binary '%s' is not executable"),
|
||||
fs->binary);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!virFileExists(fs->src->path)) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("the virtiofs export directory '%s' does not exist"),
|
||||
|
Loading…
Reference in New Issue
Block a user