]> git.proxmox.com Git - proxmox-backup.git/commit
mount/map: use names for map/unmap for easier use
authorStefan Reiter <s.reiter@proxmox.com>
Wed, 7 Oct 2020 11:53:05 +0000 (13:53 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 8 Oct 2020 06:35:52 +0000 (08:35 +0200)
commit2d7d6e61be112fd1922734a9fde64c37c81df955
treee307a360bdb12645417413e23443dae602c70bd2
parent4ec17f7eb502ed81fc7abbde89da2aac460f361b
mount/map: use names for map/unmap for easier use

So user doesn't need to remember which loop devices he has mapped to
what.

systemd unit encoding is used to transform a unique identifier for the
mapped image into a suitable name. The files created in /run/pbs-loopdev
will be named accordingly.

The encoding all happens outside fuse_loop.rs, so the fuse_loop module
does not need to care about encodings - it can always assume a name is a
valid filename.

'unmap' without parameter displays all current mappings. It's
autocompletion handler will list the names of all currently mapped
images for easy selection. Unmap by /dev/loopX or loopdev number is
maintained, as those can be distinguished from mapping names.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
src/bin/proxmox_backup_client/mount.rs
src/tools/fuse_loop.rs