From: Imre Kaloz Date: Mon, 24 Nov 2014 15:49:02 +0000 (+0100) Subject: Handle overlayfs' new name in 3.18 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d42c64d78f4224dd0a0a4effc0754215f2af3851;p=oweals%2Ffstools.git Handle overlayfs' new name in 3.18 overlayfs has been renamed in Linus' tree - try both names in mount.c Signed-off-by: Imre Kaloz --- diff --git a/libfstools/mount.c b/libfstools/mount.c index 903043f..970b9cf 100644 --- a/libfstools/mount.c +++ b/libfstools/mount.c @@ -115,9 +115,13 @@ fopivot(char *rw_root, char *ro_root) mkdir(upperdir, 0755); mkdir(workdir, 0755); - if (mount(overlay, "/mnt", "overlayfs", MS_NOATIME, lowerdir)) { - fprintf(stderr, "mount failed: %s, options %s\n", strerror(errno), lowerdir); - return -1; + /* Mainlined overlayfs has been renamed to "overlay", try that first */ + if (mount(overlay, "/mnt", "overlay", MS_NOATIME, lowerdir)) { + if (mount(overlay, "/mnt", "overlayfs", MS_NOATIME, lowerdir)) { + fprintf(stderr, "mount failed: %s, options %s\n", + strerror(errno), lowerdir); + return -1; + } } }