mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
The existing code had a bug which you can demonstrate by doing: $ guestfish -N fs:btrfs:10G -m /dev/sda1 \ btrfs-subvolume-create /sub : btrfs-subvolume-snapshot /sub /snap1 : \ btrfs-subvolume-snapshot /sub /snap123 : \ btrfs-subvolume-snapshot /sub /snap123456 : \ btrfs-subvolume-show /sub ... libguestfs: error: appliance closed the connection unexpectedly. This usually means the libguestfs appliance crashed. As the code for parsing the output and creating the comma-separated list of snapshots was unncessarily complicated in the first place, simplify it. This also fixes the bug. This also adds a regression test. Thanks: Arye Yurkovsky Link: https://lists.libguestfs.org/archives/list/guestfs@lists.libguestfs.org/thread/QV5VDHIH7WRUNAE54K6OEOKJMWL6M7EM/