[libvirt] [PATCH 2/2] qemu: Also treat directories properly when using namespaces

Martin Kletzander mkletzan at redhat.com
Mon Aug 21 05:40:34 UTC 2017


On Fri, Aug 18, 2017 at 05:36:04PM +0200, Martin Kletzander wrote:
>Partially-resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1443434
>
>Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
>---
> src/qemu/qemu_domain.c | 38 +++++++++++++++++++++++++++++++++-----
> 1 file changed, 33 insertions(+), 5 deletions(-)
>
>diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
>index 40608554c473..b5fc6697ed29 100644
>--- a/src/qemu/qemu_domain.c
>+++ b/src/qemu/qemu_domain.c
>@@ -7837,6 +7837,7 @@ qemuDomainCreateDeviceRecursive(const char *device,
>     isLink = S_ISLNK(sb.st_mode);
>     isDev = S_ISCHR(sb.st_mode) || S_ISBLK(sb.st_mode);
>     isReg = S_ISREG(sb.st_mode) || S_ISFIFO(sb.st_mode) || S_ISSOCK(sb.st_mode);
>+    isDir = S_ISDIR(sb.st_mode);
>

I forgot to squash this in before sending.  It is already part of the
patch in my local tree, though.

diff --git i/src/qemu/qemu_domain.c w/src/qemu/qemu_domain.c
index 3fc1183cbe7a..fd91dc430252 100644
--- i/src/qemu/qemu_domain.c
+++ w/src/qemu/qemu_domain.c
@@ -7850,6 +7850,7 @@ qemuDomainCreateDeviceRecursive(const char *device,
     bool isLink = false;
     bool isDev = false;
     bool isReg = false;
+    bool isDir = false;
     bool create = false;
 #ifdef WITH_SELINUX
     char *tcon = NULL;
@@ -8840,6 +8841,7 @@ qemuDomainAttachDeviceMknodRecursive(virQEMUDriverPtr driver,
     char *target = NULL;
     bool isLink;
     bool isReg;
+    bool isDir;

     if (!ttl) {
         virReportSystemError(ELOOP,
--

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170821/c3d0e648/attachment-0001.sig>


More information about the libvir-list mailing list