aboutsummaryrefslogtreecommitdiffstats
path: root/g13/call-syshelp.c
diff options
context:
space:
mode:
Diffstat (limited to 'g13/call-syshelp.c')
-rw-r--r--g13/call-syshelp.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/g13/call-syshelp.c b/g13/call-syshelp.c
index 952d8de77..76d181b67 100644
--- a/g13/call-syshelp.c
+++ b/g13/call-syshelp.c
@@ -522,6 +522,40 @@ call_syshelp_run_mount (ctrl_t ctrl, int conttype, const char *mountpoint,
/*
+ * Run the UMOUNT command on the current device. CONTTYPES gives the
+ * content type of the container (fixme: Do we really need this?).
+ */
+gpg_error_t
+call_syshelp_run_umount (ctrl_t ctrl, int conttype)
+{
+ gpg_error_t err;
+ assuan_context_t ctx;
+
+ err = start_syshelp (ctrl, &ctx);
+ if (err)
+ goto leave;
+
+ if (conttype == CONTTYPE_DM_CRYPT)
+ {
+ err = assuan_transact (ctx, "UMOUNT dm-crypt",
+ NULL, NULL,
+ NULL, NULL,
+ NULL, NULL);
+ }
+ else
+ {
+ log_error ("invalid backend type %d given\n", conttype);
+ err = GPG_ERR_INTERNAL;
+ goto leave;
+ }
+
+ leave:
+ return err;
+}
+
+
+
+/*
* Run the SUSPEND command on the current device. CONTTYPES gives the
* requested content type for the new container.
*/