diff options
author | Karel Zak | 2012-01-11 16:16:00 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-11 16:16:00 +0100 |
commit | 1a7a421ed74bc8502cdd9d1de46bc78c62b71b7d (patch) | |
tree | 1eb7fc58b8ec2f414246c52d0350fa7b04c01d51 /libmount/src/context.c | |
parent | losetup: add note about non-root users to losetup.8 (diff) | |
download | kernel-qcow2-util-linux-1a7a421ed74bc8502cdd9d1de46bc78c62b71b7d.tar.gz kernel-qcow2-util-linux-1a7a421ed74bc8502cdd9d1de46bc78c62b71b7d.tar.xz kernel-qcow2-util-linux-1a7a421ed74bc8502cdd9d1de46bc78c62b71b7d.zip |
libmount: add support for encrypted loopdevs
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context.c')
-rw-r--r-- | libmount/src/context.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libmount/src/context.c b/libmount/src/context.c index 19954096b..d67f692a1 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -897,6 +897,26 @@ struct libmnt_cache *mnt_context_get_cache(struct libmnt_context *cxt) } /** + * mnt_context_set_passwd_cb: + * @cxt: mount context + * + * Sets callbacks for encryption password. + * + * Returns: 0 on success, negative number in case of error. + */ +int mnt_context_set_passwd_cb(struct libmnt_context *cxt, + char *(*get)(struct libmnt_context *), + void (*release)(struct libmnt_context *, char *)) +{ + if (!cxt) + return -EINVAL; + + cxt->pwd_get_cb = get; + cxt->pwd_release_cb = release; + return 0; +} + +/** * mnt_context_get_lock: * @cxt: mount context * |