mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: Remove /dev mount info properly
Just so it doesn't bite us in the future, even though it's unlikely. And fix the comment above it as well. Commit e08ee7cd3405 took the info from the function it's calling, but that was lie itself in the first place. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
08ad8f9fe2
commit
c1140eb9ed
@ -226,11 +226,10 @@ qemuDomainGetPreservedMounts(virQEMUDriverPtr driver,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Okay, this is crazy. But virFileGetMountSubtree() fetched us all the
|
/* Since the list is sorted and only has paths that start with /dev, the
|
||||||
* mount points under /dev including /dev itself. Fortunately, the paths
|
* /dev itself can only be first. */
|
||||||
* are sorted based on their length so we skip the first one (/dev) as it
|
if (STREQ(mounts[0], "/dev"))
|
||||||
* is handled differently anyway. */
|
VIR_DELETE_ELEMENT(mounts, 0, nmounts);
|
||||||
VIR_DELETE_ELEMENT(mounts, 0, nmounts);
|
|
||||||
|
|
||||||
if (VIR_ALLOC_N(paths, nmounts) < 0)
|
if (VIR_ALLOC_N(paths, nmounts) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user