<div class="__aliyun_email_body_block"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">       1. Users can decided whether to use ntfs-3g themselves, if so, just slect it at "make menuconfig->utility->filesystem->ntfs-3g-utils";</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">       2. This sentence "<span  style="color:#000000;font-family:Tahoma,Arial;font-size:14.0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;text-align:start;text-indent:.0px;text-transform:none;widows:2;background-color:#ffffff;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline;">access("/sbin/mount.ntfs-3g", X_OK)</span>"   does the test for its presence or not;</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">       3. There are 2 way to mount devices of ntfs filesystem, default is readonly while writable with fuseblk(ntfs-3g),  </span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">           so we need to do a special test here that avoid user remount it again and again when system boot.</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><blockquote  style="margin-right:.0px;margin-top:.0px;margin-bottom:.0px;"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">------------------------------------------------------------------</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">From:Philip Prindeville <philipp_subx@redfish-solutions.com></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Send Time:2018 Oct 1 (Mon) 12:21</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">To:Rosy Song <rosysong@rosinson.com></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Cc:openwrt-devel <openwrt-devel@lists.openwrt.org></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Subject:Re: [OpenWrt-Devel] [PATCH, V2] fstools: mount ntfs with ntfs-3g utility if it exist</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div>I’m not seeing where “mount.ntfs-3g” is being set as the program to use...  and should the test for the presence and modes of the program be generic? i.e. regardless of what type of FS or which program you use to mount it, you’ll want to test for its presence.<br ><br >So these are really two independent things.<br ><br ><br >> On Sep 30, 2018, at 9:04 PM, Rosy Song <rosysong@rosinson.com> wrote:<br >> <br >> Signed-off-by: Rosy Song <rosysong@rosinson.com><br >> ---<br >> block.c | 8 +++++++-<br >> 1 file changed, 7 insertions(+), 1 deletion(-)<br >> <br >> diff --git a/block.c b/block.c<br >> index 2651c86..b2cd32b 100644<br >> --- a/block.c<br >> +++ b/block.c<br >> @@ -881,7 +881,13 @@ static int handle_mount(const char *source, const char *target,<br >>    size_t mount_opts_len;<br >>    char *mount_opts = NULL, *ptr;<br >> <br >> -    err = mount(source, target, fstype, m ? m->flags : 0,<br >> +    /* Mount ntfs filesystem with ntfs-3g utility */<br >> +    if (!strcmp(fstype, "ntfs") &&<br >> +        !access("/sbin/mount.ntfs-3g", X_OK)) {<br >> +        err = -1;<br >> +        errno = ENODEV;<br >> +    } else<br >> +        err = mount(source, target, fstype, m ? m->flags : 0,<br >>                (m && m->options) ? m->options : "");<br >> <br >>    /* Requested file system type is not available in kernel,<br >> -- <br >> 2.17.0<br >> <br >> <br >> _______________________________________________<br >> openwrt-devel mailing list<br >> openwrt-devel@lists.openwrt.org<br >> https://lists.openwrt.org/mailman/listinfo/openwrt-devel</blockquote><div ><br ></div></div>