mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
g13: Implement --umount for dm-crypt.
* g13/g13.c (main): Implement command --umount. * g13/mount.c (g13_umount_container): use the syshelper if needed. * g13/backend.c (be_umount_container): New. * g13/be-dmcrypt.c (be_dmcrypt_umount_container): New. * g13/call-syshelp.c (call_syshelp_run_umount): New. * g13/sh-cmd.c (cmd_umount): New. (register_commands): Register UMOUNT. * g13/sh-dmcrypt.c (sh_dmcrypt_umount_container): New. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
c9a0bccc77
commit
b781113cf1
11 changed files with 245 additions and 23 deletions
|
@ -64,6 +64,23 @@ be_dmcrypt_mount_container (ctrl_t ctrl,
|
|||
}
|
||||
|
||||
|
||||
/* Unmount the container described by the filename FNAME. */
|
||||
gpg_error_t
|
||||
be_dmcrypt_umount_container (ctrl_t ctrl, const char *fname)
|
||||
{
|
||||
gpg_error_t err;
|
||||
|
||||
err = call_syshelp_set_device (ctrl, fname);
|
||||
if (err)
|
||||
goto leave;
|
||||
|
||||
err = call_syshelp_run_umount (ctrl, CONTTYPE_DM_CRYPT);
|
||||
|
||||
leave:
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
/* Suspend the container described by the filename FNAME. */
|
||||
gpg_error_t
|
||||
be_dmcrypt_suspend_container (ctrl_t ctrl, const char *fname)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue