diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2018-07-19 11:43:29 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2018-07-19 13:29:39 +0200 |
commit | 297a9c6300a5ced0547488688de3a07a11a629c7 (patch) | |
tree | 9a76e0185779bd2645a77961a5d7fe8c97fc54e8 /genimage.c | |
parent | 3452533c825121d2d6b2b80cd27758df1c51c610 (diff) | |
download | genimage-297a9c6300a5ced0547488688de3a07a11a629c7.tar.gz genimage-297a9c6300a5ced0547488688de3a07a11a629c7.tar.xz |
genimage: fix timestamp of mountpoint directories
After the mv/mkdir of the mountpoints the timestamps of the mountpoint and all
parent dirs are changed.
This patch adds a find/touch loop to fix the timestamp of all directories.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'genimage.c')
-rw-r--r-- | genimage.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -432,6 +432,16 @@ static int collect_mountpoints(void) return ret; } + /* + * After the mv/mkdir of the mountpoints the timestamps of the + * mountpoint and all parent dirs are changed. Fix that here. + */ + ret = systemp(NULL, + "find '%s/root' -depth -type d -printf '%%P\\0' | xargs -0 -I {} touch -r '%s/{}' '%s/root/{}'", + tmppath(), rootpath(), tmppath()); + if (ret) + return ret; + return 0; } |