libfstools: move mount points when switching to JFFS2 master
authorRafał Miłecki <rafal@milecki.pl>
Mon, 16 Apr 2018 14:11:47 +0000 (16:11 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Mon, 16 Apr 2018 17:10:17 +0000 (19:10 +0200)
commite24368361db166cf369a19cea773bd54f9d854b1
tree1f542d6a848d43affde2655168616e288f6b1163
parent3782b59e8f6391134cf146033ebe3baa1fbc0f5a
libfstools: move mount points when switching to JFFS2

Switching from "tmpfs" to "jffs2" happens after JFFS2 formatting is
done. During that time user can use filesystem (thanks to RAM) and the
role of switch2jffs() is to copy all changes to the JFFS2 overlay
partition.

What wasn't handled so far was moving mount points. User can create
custom mounts, cp command won't copy them and umounting "tmpfs" will
cause these mounts to go away. To preserve them switch2jffs() has to
find all custom mount points and move them to the new filesystem.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
libfstools/overlay.c