mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
5441d3dd0c8843897f65c8d40c82e0d204748b4e
A customer case was found where /etc/fstab contained multiple root mountpoints, something like: LABEL=System / xfs ... LABEL=Boot /boot ext2 ... LABEL=System / xfs ... This causes libguestfs and virt-v2v to fail. Either (on RHEL 9) we try to mount the second instance of / which gives an error. Or (on upstream kernels) we are able to mount the second instance but then libguestfs gets confused when trying to unmount them. In this case as the mounted devices are the same we can just delete the duplicate. It's also possible that there could be multiple non-identical root mountpoints, in which case we have to pick one, and this code arbitrarily picks the first[*] (but emits a warning). We don't do anything for non-root mountpoints. Update common submodule to add 'List.same' function from mlstdutils. [*] Which one is "the first" depends on what version of ocaml-augeas we are using. ocaml-augeas version 0.6 Augeas.matches function returns entries in reverse order (compared to augeas itself). This is fixed in version 0.7: http://git.annexia.org/?p=ocaml-augeas.git;a=commitdiff;h=b703b92e3d26690aa6f7b822132049ce5435983e Fixes: https://issues.redhat.com/browse/RHEL-90168
Libguestfs is tools and a library for accessing and modifying guest disk images. For more information see the home page: http://libguestfs.org/ For discussion, development, patches, etc. please use the mailing list: https://lists.libguestfs.org To find out how to build libguestfs from source, read: docs/guestfs-building.pod http://libguestfs.org/guestfs-building.1.html man docs/guestfs-building.1 Copyright (C) 2009-2025 Red Hat Inc. The library is distributed under the LGPLv2+. The programs are distributed under the GPLv2+. Please see the files COPYING and COPYING.LIB for full license information. The examples are under a very liberal license.
Description
Languages
C
42.7%
OCaml
35.5%
Shell
7.1%
Makefile
4%
Perl
2.6%
Other
8%