summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2017-03-27 13:17:40 +0200
committerDaniel Golle <daniel@makrotopia.org>2017-06-30 17:25:24 +0200
commitbe5004c60e8c5f3b98c1e854d36d7798438ae56c (patch)
treed70056a96a3d3d7ae8418a6d81087c5c3ebea904
parent34d36c29b9d599b0748d49aca8dab2c122633d35 (diff)
downloadfstools-be5004c60e8c5f3b98c1e854d36d7798438ae56c.tar.gz
libfstools: add basic documentation of mount functions
Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: John Crispin <john@phrozen.org>
-rw-r--r--libfstools/mount.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libfstools/mount.c b/libfstools/mount.c
index 371082b..551f4e7 100644
--- a/libfstools/mount.c
+++ b/libfstools/mount.c
@@ -25,6 +25,12 @@
/* this is a raw syscall - man 2 pivot_root */
extern int pivot_root(const char *new_root, const char *put_old);
+/**
+ * mount_move - move mounted point to the new location
+ *
+ * @oldroot: directory that is current location of mount point
+ * @newroot: new directory for the mount point
+ */
int
mount_move(char *oldroot, char *newroot, char *dir)
{
@@ -79,6 +85,12 @@ pivot(char *new, char *old)
return 0;
}
+/**
+ * fopivot - switch to overlay using passed dir as upper one
+ *
+ * @rw_root: writable directory that will be used as upper dir
+ * @ro_root: directory where old root will be put
+ */
int
fopivot(char *rw_root, char *ro_root)
{
@@ -134,6 +146,9 @@ fopivot(char *rw_root, char *ro_root)
return pivot("/mnt", ro_root);
}
+/**
+ * ramoverlay - use RAM to store filesystem changes on top of RO root
+ */
int
ramoverlay(void)
{