From: Roman Yeryomin Date: Sun, 7 Jan 2018 18:04:02 +0000 (+0200) Subject: overlay: fix compilation with glibc X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=18090d97b61cc091ed3f49c3ec8ba42c761f1d15;p=project%2Ffstools.git overlay: fix compilation with glibc 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 Acked-by: Florian Fainelli --- diff --git a/libfstools/overlay.c b/libfstools/overlay.c index 0187a55..1d69f5a 100644 --- a/libfstools/overlay.c +++ b/libfstools/overlay.c @@ -257,7 +257,8 @@ jffs2_switch(struct volume *v) /* try hard to be in sync */ ULOG_INFO("syncronizing overlay\n"); - system("cp -a /tmp/root/upper/* / 2>/dev/null"); + if (system("cp -a /tmp/root/upper/* / 2>/dev/null")) + ULOG_ERR("failed to sync jffs2 overlay\n"); break; case FS_EXT4: