summaryrefslogtreecommitdiffstats
path: root/libmount/src/mountP.h
diff options
context:
space:
mode:
authorVaclav Dolezal2018-02-19 18:45:55 +0100
committerKarel Zak2018-06-11 15:49:48 +0200
commit4917d842ea6feb1e815f701826dadbef3feb066f (patch)
tree4b88decd9a37c99ac94f190a40ab2fedd273faaf /libmount/src/mountP.h
parentwipefs: postpone BLKRRPART until all is done (diff)
downloadkernel-qcow2-util-linux-4917d842ea6feb1e815f701826dadbef3feb066f.tar.gz
kernel-qcow2-util-linux-4917d842ea6feb1e815f701826dadbef3feb066f.tar.xz
kernel-qcow2-util-linux-4917d842ea6feb1e815f701826dadbef3feb066f.zip
libmount: add support for switching namespaces
[kzak@redhat.com: - cosmetic changes, add some comments] Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/mountP.h')
-rw-r--r--libmount/src/mountP.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h
index 4ce891cda..0c795121a 100644
--- a/libmount/src/mountP.h
+++ b/libmount/src/mountP.h
@@ -268,6 +268,11 @@ struct libmnt_addmount {
struct list_head mounts;
};
+struct libmnt_ns {
+ int fd; /* file descriptor of namespace, -1 when inactive */
+ struct libmnt_cache *cache; /* paths cache associated with NS */
+};
+
/*
* Mount context -- high-level API
*/
@@ -329,6 +334,10 @@ struct libmnt_context
int syscall_status; /* 1: not called yet, 0: success, <0: -errno */
+ struct libmnt_ns ns_orig; /* original namespace */
+ struct libmnt_ns ns_tgt; /* target namespace */
+ struct libmnt_ns *ns_cur; /* pointer to current namespace */
+
unsigned int enabled_textdomain : 1; /* bindtextdomain() called */
};