diff mbox

[OpenWrt-Devel] fstools: allow to stack another overlay on top of existing one

Message ID 1450561082-3074-1-git-send-email-roman@advem.lv
State Accepted
Headers show

Commit Message

Roman Yeryomin Dec. 19, 2015, 9:38 p.m. UTC
`mount_root ram' will pivot existing root to ram even if it was
overlayfs already. Useful when playing with new configurations
as it allows to preserve existing/stable configuration.

Signed-off-by: Roman Yeryomin <roman@advem.lv>
---
 mount_root.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/mount_root.c b/mount_root.c
index 7b69c7f..bf70265 100644
--- a/mount_root.c
+++ b/mount_root.c
@@ -117,6 +117,8 @@  int main(int argc, char **argv)
 {
 	if (argc < 2)
 		return start(argc, argv);
+	if (!strcmp(argv[1], "ram"))
+		return ramoverlay();
 	if (!strcmp(argv[1], "stop"))
 		return stop(argc, argv);
 	if (!strcmp(argv[1], "done"))