From: Daniel Golle Date: Thu, 15 Oct 2020 23:31:15 +0000 (+0100) Subject: overlay: use precompiler macros for reoccuring path names X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=46a56d38a389e2db49d6c79adae8f016c60e1d1e;p=project%2Ffstools.git overlay: use precompiler macros for reoccuring path names Signed-off-by: Daniel Golle --- diff --git a/libfstools/overlay.c b/libfstools/overlay.c index 39215d5..508d23f 100644 --- a/libfstools/overlay.c +++ b/libfstools/overlay.c @@ -35,6 +35,7 @@ #endif #define SWITCH_JFFS2 "/tmp/.switch_jffs2" +#define OVERLAYDIR "/rom/overlay" static bool keep_sysupgrade; @@ -181,11 +182,11 @@ switch2jffs(struct volume *v) return -1; } - creat("/tmp/.switch_jffs2", 0600); - ret = mount(v->blk, "/rom/overlay", "jffs2", MS_NOATIME, NULL); - unlink("/tmp/.switch_jffs2"); + creat(SWITCH_JFFS2, 0600); + ret = mount(v->blk, OVERLAYDIR, "jffs2", MS_NOATIME, NULL); + unlink(SWITCH_JFFS2); if (ret) { - ULOG_ERR("failed - mount -t jffs2 %s /rom/overlay: %m\n", v->blk); + ULOG_ERR("failed - mount -t jffs2 %s %s: %m\n", v->blk, OVERLAYDIR); return -1; }