[LEDE-DEV] [PATCH fstools] libfstools: add basic documentation of mount functions

Rafał Miłecki zajec5 at gmail.com
Mon Mar 27 04:17:40 PDT 2017


From: Rafał Miłecki <rafal at milecki.pl>

Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 libfstools/mount.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/libfstools/mount.c b/libfstools/mount.c
index 81176ce..5358536 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)
 {
-- 
2.11.0




More information about the Lede-dev mailing list