[LEDE-DEV] [PATCH]fstools: added f2fs to block-mount
Alberto Bursi
alberto.bursi at outlook.it
Tue Oct 18 02:22:04 PDT 2016
added the code to recognize the filesystem checker of f2fs
added f2fs to the filesystem whitelist of block so it can mount it on
/overlay at boot.
I've looked at fstools, adding proper xfs support to fstools is a bit
more involved and will take some time (to me anyway), I need f2fs
support to land sooner than that.
Signed-off-by: Alberto Bursi <alberto.bursi at outlook.it>
-----
--- /fstools/block.c 2016-10-15 19:15:31.916714011 +0200
+++ /fstools/block.c 2016-10-18 11:05:12.861778070 +0200
@@ -702,6 +702,7 @@ static void check_filesystem(struct blki
{
pid_t pid;
struct stat statbuf;
+ const char *f2fsck = "/usr/sbin/fsck.f2fs";
const char *e2fsck = "/usr/sbin/e2fsck";
const char *dosfsck = "/usr/sbin/dosfsck";
const char *ckfs;
@@ -712,6 +713,8 @@ static void check_filesystem(struct blki
if (!strncmp(pr->id->name, "vfat", 4)) {
ckfs = dosfsck;
+ } else if (!strncmp(pr->id->name, "f2fs", 4)) {
+ ckfs = f2fsck;
} else if (!strncmp(pr->id->name, "ext", 3)) {
ckfs = e2fsck;
} else {
@@ -1170,8 +1173,9 @@ static int mount_extroot(char *cfg)
}
if (pr) {
if (strncmp(pr->id->name, "ext", 3) &&
- strncmp(pr->id->name, "ubifs", 5)) {
- ULOG_ERR("extroot: unsupported filesystem %s, try ext4\n",
pr->id->name);
+ strncmp(pr->id->name, "f2fs", 4) &&
+ strncmp(pr->id->name, "ubifs", 5)) {
+ ULOG_ERR("extroot: unsupported filesystem %s, try ext4,
f2fs or ubifs\n", pr->id->name);
return -1;
}
More information about the Lede-dev
mailing list