| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
glibc in version 2.36 defines an own function named move_mount() in some
header. The definition from glibc collides with our definition, just
rename the function in fstools.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
|
|
|
|
|
|
|
|
| |
Now that procd only relables the filesystem in case of the system
beging started with initramfs we will again need to take care of
labeling newly created /overlay.
This reverts commit 9e11b3723ce30b9b8c94ad7d15072a10cf13c0b4.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
|
| |
Now that procd takes care of it properly we no longer need this hack.
Remove it to safe some space also on non-SELinux systems.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
| |
This avoids duplicating path over and over.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
| |
Replace it with mount_extroot() argument. It's cleaner than a global
var.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
| |
Comment in start() was invalid as mount_extroot() doesn't handle any
mounting internally. It was a misunderstanding coming from block.c
function called just the same.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
| |
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
| |
Improve error handling and fix a resource leak inside an error path.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
| |
So it's now correct `synchronizing`.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
|
|
|
|
|
|
| |
Use restorecon to apply SELinux labels if applicable.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
| |
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
|
|
|
| |
This was originally a patch for musl. It is not present in musl as it is a
GNU extension.
Place it here where it belongs.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
|
|
| |
In order to allow the mounting of the filesystem with full access time
accounting, a new CMake option (eg: CMAKE_OVL_MOUNT_FULL_ACCESS_TIME)
has been added.
Signed-off-by: Pierre Lebleu <pme.lebleu@gmail.com>
|
|
|
|
|
|
|
| |
In order to allow the mounting of the filesystem with the zlib compression,
a new CMake option (eg: CMAKE_OVL_MOUNT_COMPRESS_ZLIB) has been added.
Signed-off-by: Pierre Lebleu <pme.lebleu@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit cc63723d886fd ("overlay: use lstat rather than stat and make sure
there are no trailing spaces") changed behavior of foreachdir() breaking
some callbacks. Before that modification all callbacks were getting
directory with a trailing slash. Above commit started removing them.
This broke handle_whiteout() which doesn't work at all since then. It
constructs file paths incorrectly: slash is missing between directory
and a file name. It seems noone noticed it for years because this issue
got hidden by switch2jffs() which also handles whiteouts with its system
command "cp -a" call.
Fix that regression by setting trailing slash back - right after calling
lstat(). Also to keep code simple just skip all entries that aren't
directories. This keeps conditions for removing/setting trailing slash
trivial. A side effect is not calling callbacks for files which is a
free bonus optimization.
Fixes: cc63723d886fd ("overlay: use lstat rather than stat and make sure there are no trailing spaces")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glibc fails with:
warn_unused_result [-Wunused-result]
system("cp -a /tmp/root/upper/* / 2>/dev/null");
Regression intoroduced with 11efbf3b90f031ce634fc38cad07a4aef2985777
Reported here:
https://www.mail-archive.com/lede-dev@lists.infradead.org/msg10502.html
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
|
|
|
|
|
|
|
| |
glob should handle paths like /foo/bar//* so we probably don't need this
extra check & code.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
| |
Alloc globdir buffer dynamically and simply use realloc when needed.
This fixes e.g. segmentation fault in jffs2reset due to an infinite
recurrency when dealing with longs paths.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a race between `cp -a /tmp/root/* /rom/overlay` from
libfstools/overlay.c and a process creating new file(s) before
pivot(/rom, /mnt) occured.
That is a process can create a file and it will not be copied.
To workaround this, do additional copy after jffs2 is ready.
This doesn't completely solve the problem but since there
was no other fix provided since original RFC [1], it is better
than nothiing.
[1] https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg38218.html
Signed-off-by: Roman Yeryomin <roman@advem.lv>
|
|
|
|
|
|
| |
Saves 1472 bytes under glibc. No other difference.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
|
|
| |
This reverts commit bf4f08af9b8fe991216023a906182744eb1e4645.
this patch was breaking devices that have a normal ext4 rootfs
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
|
|
|
| |
This change will enables eMMC (ext4 fs) boot support, when we try to boot
from eMMC card then it will read partition names from
/sys/block/mmcblkX/mmcblkXY/uevent
file and will mount the rootfs_data partition as ext4fs overlay.
Signed-off-by: Ram Chandra Jangir <rjangi@codeaurora.org>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
|
|
| |
with this patch even uclibc wont deleted symlinked folders
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
|
|
| |
xattr seems to be unreliable with jffs2
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
|
|
| |
Remove all files (except sysupgrade.tgz) if /etc/init.d/done was not called
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
|
|
| |
excluding sysupgrade.tgz)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
| |
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
|
|
| |
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
|
|
|
|
|
| |
This optimizes code: drops unneeded calls to the volume_find and checks.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
change find_mount_point parameter to match either all or only
jffs2 and ubifs, which are typically used on embedded mtd devices.
For now, find_mount_point was used without the fstype parameter
except for a single occurance in jffs2reset. There it is desireable
to apply the same logic as previously hard-coded to jffs2 also in the
case of a ubifs overlay, so firstboot aka. factory-reset works as
expected.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
| |
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
|
|
|
| |
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
Signed-off-by: John Crispin <blogic@openwrt.org>
|