summaryrefslogtreecommitdiffstats
path: root/lib/loopdev.c
diff options
context:
space:
mode:
authorKarel Zak2012-05-28 12:26:36 +0200
committerKarel Zak2012-05-28 12:26:36 +0200
commit82756a747e4bcfc13a27b7618d889af080649584 (patch)
tree6bfb5688d38e1d571ae6b1a960a0520bf4e1af73 /lib/loopdev.c
parentmount: (old) fix encryption= usage (diff)
downloadkernel-qcow2-util-linux-82756a747e4bcfc13a27b7618d889af080649584.tar.gz
kernel-qcow2-util-linux-82756a747e4bcfc13a27b7618d889af080649584.tar.xz
kernel-qcow2-util-linux-82756a747e4bcfc13a27b7618d889af080649584.zip
libmount: add MNT_ERR_LOOPDEV
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib/loopdev.c')
-rw-r--r--lib/loopdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/loopdev.c b/lib/loopdev.c
index fd3f9bae5..c0f701896 100644
--- a/lib/loopdev.c
+++ b/lib/loopdev.c
@@ -173,6 +173,8 @@ int loopcxt_init(struct loopdev_cxt *lc, int flags)
*/
void loopcxt_deinit(struct loopdev_cxt *lc)
{
+ int errsv = errno;
+
if (!lc)
return;
@@ -183,6 +185,8 @@ void loopcxt_deinit(struct loopdev_cxt *lc)
loopcxt_set_device(lc, NULL);
loopcxt_deinit_iterator(lc);
+
+ errno = errsv;
}
/*