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

Philip Prindeville philipp at redfish-solutions.com
Mon Oct 1 12:57:57 EDT 2018



> On Oct 1, 2018, at 10:22 AM, Jérôme Benoit <jbenoit100 at gmail.com> wrote:
> 
> Signed PGP part
> Le 01/10/2018 à 06:21, Philip Prindeville a écrit :
>> I’m not seeing where “mount.ntfs-3g” is being set as the program to use...
> 
> I think this patch is just plain wrong.
> A correct one has been done here :
> http://lists.infradead.org/pipermail/openwrt-devel/2018-September/014108.html


That one is buggy, too.

@@ -725,6 +726,8 @@ static void check_filesystem(struct probe_info *pr)
 		ckfs = e2fsck;
 	} else if (!strncmp(pr->type, "btrfs", 5)) {
 		ckfs = btrfsck;
+	} else if (!strncmp(pr->type, "ntfs", 5)) {
+		ckfs = ntfsck;
 	} else {
 		ULOG_ERR("check_filesystem: %s is not supported\n", pr->type);
 		return;
@@ -743,6 +746,9 @@ static void check_filesystem(struct probe_info *pr)
 		} else if(!strncmp(pr->type, "btrfs", 5)) {
 			execl(ckfs, ckfs, "--repair", pr->dev, NULL);
 			exit(-1);
+		} else if(!strncmp(pr->type, "ntfs", 5)) {
+			execl(ckfs, ckfs, "-b", pr->dev, NULL);
+			exit(-1);
 		} else {
 			execl(ckfs, ckfs, "-p", pr->dev, NULL);
 			exit(-1);
@@ -1437,8 +1443,9 @@ static int mount_extroot(char *cfg)
 		if (strncmp(pr->type, "ext", 3) &&
 		    strncmp(pr->type, "f2fs", 4) &&
 		    strncmp(pr->type, "btrfs", 5) &&
+		    strncmp(pr->type, "ntfs", 5) &&
 		    strncmp(pr->type, "ubifs", 5)) {
-			ULOG_ERR("extroot: unsupported filesystem %s, try ext4, f2fs, btrfs or ubifs\n", pr->type);
+			ULOG_ERR("extroot: unsupported filesystem %s, try ext4, f2fs, btrfs, ntfs or ubifs\n", pr->type);
 			return -1;
 		}


Uhhh… by my count, “ntfs” is 4 letters, not 5.


> 
> ++
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20181001/29802a65/attachment.sig>
-------------- next part --------------
_______________________________________________
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