[OpenWrt-Devel] [PATCH] fstools: mount ntfs with ntfs-3g utility if it exists
Hans Dedecker
dedeckeh at gmail.com
Sun Sep 30 13:12:22 EDT 2018
On Sun, Sep 30, 2018 at 5:05 AM Rosy Song <rosysong at rosinson.com> wrote:
>
> From: Rosy Song <rosysong at rosinson.com>
> Subject: [OpenWrt-Devel] [PATCH] fstools: mount ntfs with ntfs-3g utility if it exists
>
> This patch can mount ntfs with fuseblk fs type and make the deivces to be
> mounted writable.
Did you create the patch via git format-patch ?
The patch is also missing a SoB; please have a look at
https://openwrt.org/submitting-patches
Hans
>
> --- a/block.c
> +++ b/block.c
> @@ -881,7 +881,13 @@ static int handle_mount(const char *sour
> size_t mount_opts_len;
> char *mount_opts = NULL, *ptr;
>
> - err = mount(source, target, fstype, m ? m->flags : 0,
> + if (!strncmp(fstype, "ntfs", strlen(fstype)) &&
> + !access("/sbin/mount.ntfs-3g", X_OK)) {
> + // mount ntfs filesystem with ntfs-3g utility
> + err = -1;
> + errno = ENODEV;
> + } else
> + err = mount(source, target, fstype, m ? m->flags : 0,
> (m && m->options) ? m->options : "");
>
> /* Requested file system type is not available in kernel,
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list