<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr"><br></div><div dir="ltr"><br>On Sep 28, 2018, at 16:31, Ansuel Smith <<a href="mailto:ansuelsmth@gmail.com">ansuelsmth@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div dir="auto">If you also install ntfs-3g it's not read only </div></div></blockquote>Hmm? That requires specifying NTFS-3G manually, no?<br><blockquote type="cite"><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">Il Sab 29 Set 2018, 01:28 Rosen Penev <<a href="mailto:rosenp@gmail.com">rosenp@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 28, 2018 at 16:01 Ansuel Smith <<a href="mailto:ansuelsmth@gmail.com" target="_blank" rel="noreferrer">ansuelsmth@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This adds ntfs support to block-mount</blockquote><div dir="auto">What’s the point of this? This is also read only if I’m not mistaken.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Signed-off-by: Ansuel Smith <<a href="mailto:ansuelsmth@gmail.com" target="_blank" rel="noreferrer">ansuelsmth@gmail.com</a>><br>
---<br>
 block.c | 9 ++++++++-<br>
 1 file changed, 8 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/block.c b/block.c<br>
index b377429..2e3841a 100644<br>
--- a/block.c<br>
+++ b/block.c<br>
@@ -711,6 +711,7 @@ static void check_filesystem(struct probe_info *pr)<br>
        const char *f2fsck = "/usr/sbin/fsck.f2fs";<br>
        const char *dosfsck = "/usr/sbin/dosfsck";<br>
        const char *btrfsck = "/usr/bin/btrfsck";<br>
+       const char *ntfsck = "/usr/bin/ntfsfix";<br>
        const char *ckfs;<br>
<br>
        /* UBIFS does not need stuff like fsck */<br>
@@ -725,6 +726,8 @@ static void check_filesystem(struct probe_info *pr)<br>
                ckfs = e2fsck;<br>
        } else if (!strncmp(pr->type, "btrfs", 5)) {<br>
                ckfs = btrfsck;<br>
+       } else if (!strncmp(pr->type, "ntfs", 4)) {<br>
+               ckfs = ntfsck;<br>
        } else {<br>
                ULOG_ERR("check_filesystem: %s is not supported\n", pr->type);<br>
                return;<br>
@@ -743,6 +746,9 @@ static void check_filesystem(struct probe_info *pr)<br>
                } else if(!strncmp(pr->type, "btrfs", 5)) {<br>
                        execl(ckfs, ckfs, "--repair", pr->dev, NULL);<br>
                        exit(-1);<br>
+               } else if(!strncmp(pr->type, "ntfs", 4)) {<br>
+                       execl(ckfs, ckfs, "-b", pr->dev, NULL);<br>
+                       exit(-1);<br>
                } else {<br>
                        execl(ckfs, ckfs, "-p", pr->dev, NULL);<br>
                        exit(-1);<br>
@@ -1437,8 +1443,9 @@ static int mount_extroot(char *cfg)<br>
                if (strncmp(pr->type, "ext", 3) &&<br>
                    strncmp(pr->type, "f2fs", 4) &&<br>
                    strncmp(pr->type, "btrfs", 5) &&<br>
+                   strncmp(pr->type, "ntfs", 4) &&<br>
                    strncmp(pr->type, "ubifs", 5)) {<br>
-                       ULOG_ERR("extroot: unsupported filesystem %s, try ext4, f2fs, btrfs or ubifs\n", pr->type);<br>
+                       ULOG_ERR("extroot: unsupported filesystem %s, try ext4, f2fs, btrfs, ntfs or ubifs\n", pr->type);<br>
                        return -1;<br>
                }<br>
<br>
-- <br>
2.17.1<br>
<br>
<br>
_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org" target="_blank" rel="noreferrer">openwrt-devel@lists.openwrt.org</a><br>
<a href="https://lists.openwrt.org/mailman/listinfo/openwrt-devel" rel="noreferrer noreferrer" target="_blank">https://lists.openwrt.org/mailman/listinfo/openwrt-devel</a><br>
</blockquote></div></div>
</blockquote></div>
</div></blockquote></body></html>