summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shlibs/mount/src/context.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/shlibs/mount/src/context.c b/shlibs/mount/src/context.c
index 23cb4b994..a481d9cb8 100644
--- a/shlibs/mount/src/context.c
+++ b/shlibs/mount/src/context.c
@@ -1230,6 +1230,8 @@ int mnt_context_prepare_update(struct libmnt_context *cxt)
assert(cxt->action);
assert((cxt->flags & MNT_FL_MOUNTFLAGS_MERGED));
+ DBG(CXT, mnt_debug_h(cxt, "prepare update"));
+
if (cxt->mountflags & MS_PROPAGATION) {
DBG(CXT, mnt_debug_h(cxt, "skip update: MS_PROPAGATION"));
return 0;
@@ -1253,6 +1255,13 @@ int mnt_context_prepare_update(struct libmnt_context *cxt)
DBG(CXT, mnt_debug_h(cxt, "skip update: no writable destination"));
return 0;
}
+ /* 0 = success, 1 = not called yet */
+ if (cxt->syscall_status != 1 && cxt->syscall_status != 0) {
+ DBG(CXT, mnt_debug_h(cxt,
+ "skip update: syscall failed [status=%d]",
+ cxt->syscall_status));
+ return 0;
+ }
if (!cxt->update) {
cxt->update = mnt_new_update();
if (!cxt->update)
@@ -1495,6 +1504,7 @@ int mnt_context_set_syscall_status(struct libmnt_context *cxt, int status)
if (!cxt)
return -EINVAL;
+ DBG(CXT, mnt_debug_h(cxt, "syscall status set to: %d", status));
cxt->syscall_status = status;
return 0;
}