summaryrefslogtreecommitdiffstats
path: root/libmount/src/context.c
diff options
context:
space:
mode:
authorKarel Zak2012-03-02 11:23:34 +0100
committerKarel Zak2012-03-02 11:23:34 +0100
commit41d6af28c3475987a085dc085c2348e22dc7fbdd (patch)
tree77991757372ca31fc3a63eacc3d70ab87a174475 /libmount/src/context.c
parenttests: update libmount tests (diff)
downloadkernel-qcow2-util-linux-41d6af28c3475987a085dc085c2348e22dc7fbdd.tar.gz
kernel-qcow2-util-linux-41d6af28c3475987a085dc085c2348e22dc7fbdd.tar.xz
kernel-qcow2-util-linux-41d6af28c3475987a085dc085c2348e22dc7fbdd.zip
libmount: cosmetic changes around "none"
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context.c')
-rw-r--r--libmount/src/context.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libmount/src/context.c b/libmount/src/context.c
index 1f3029202..f97dd36a6 100644
--- a/libmount/src/context.c
+++ b/libmount/src/context.c
@@ -1165,6 +1165,10 @@ int mnt_context_prepare_srcpath(struct libmnt_context *cxt)
src = mnt_fs_get_source(cxt->fs);
+ if (!src && (cxt->mountflags & MS_PROPAGATION))
+ /* mount --make-{shared,private,...} */
+ return mnt_fs_set_source(cxt->fs, "none");
+
/* ignore filesystems without source or filesystems
* where the source is quasi-path (//foo/bar)
*/
@@ -1203,7 +1207,7 @@ int mnt_context_prepare_srcpath(struct libmnt_context *cxt)
if ((cxt->mountflags & (MS_BIND | MS_MOVE | MS_PROPAGATION)) ||
mnt_fs_is_pseudofs(cxt->fs)) {
- DBG(CXT, mnt_debug_h(cxt, "PROPAGATION/pseudo FS source: %s", path));
+ DBG(CXT, mnt_debug_h(cxt, "BIND/MOVE/pseudo FS source: %s", path));
return rc;
}