summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorBaeuerle, Florian <Florian.Baeuerle@allegion.com>2018-12-19 14:02:04 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-08 16:37:40 +0100
commit07ddb0584cac31be89fd111709519991fbd13de4 (patch)
tree95f8e8b2d46f97fae928e52e428a36a9bc053605 /common
parent99c1263dce3902a8961bcdcac9398bce51fccd1b (diff)
downloadbarebox-07ddb0584cac31be89fd111709519991fbd13de4.tar.gz
envfs: Sort files when generating on build machine
The resulting environment was dependend of the build machines' filesystem, i.e. the order in which readdir returns dirents depends on the filesystem implementation. Sort file entries in scripts/bareboxenv.c for generating a reproducible built-in environment. Signed-off-by: Florian Bäuerle <florian.baeuerle@allegion.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/environment.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/environment.c b/common/environment.c
index 56a030e..aba6dcd 100644
--- a/common/environment.c
+++ b/common/environment.c
@@ -277,9 +277,9 @@ int envfs_save(const char *filename, const char *dirname, unsigned flags)
size = 0; /* force no content */
} else {
/* first pass: calculate size */
- recursive_action(dirname, ACTION_RECURSE, file_action,
+ recursive_action(dirname, ACTION_RECURSE | ACTION_SORT, file_action,
NULL, &data, 0);
- recursive_action("/.defaultenv", ACTION_RECURSE,
+ recursive_action("/.defaultenv", ACTION_RECURSE | ACTION_SORT,
file_remove_action, NULL, &data, 0);
size = 0;