[OpenWrt-Devel] [PATCH] fstools: mount ntfs with ntfs-3g utility if it exists

Philip Prindeville philipp_subx at redfish-solutions.com
Sun Sep 30 16:48:39 EDT 2018


Comments inline


> On Sep 29, 2018, at 9:04 PM, 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.
> 
> --- 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)) &&


How is this any different from !strcmp(fstype, “ntfs”) ?


> +	    !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


More information about the openwrt-devel mailing list