Module Name:    src
Committed By:   tkusumi
Date:           Thu Jan  2 08:52:42 UTC 2020

Modified Files:
        src/usr.sbin/fstyp: fstyp.c

Log Message:
fstyp: Fix "exfat: iconv_open UCS-2LE: Invalid argument" failure

Fix below error for the time being.
The removed code is only relevant to Capsicum.

$ fstyp -l /dev/wd1
fstyp: exfat: iconv_open UCS-2LE: Invalid argument


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/fstyp/fstyp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/fstyp/fstyp.c
diff -u src/usr.sbin/fstyp/fstyp.c:1.11 src/usr.sbin/fstyp/fstyp.c:1.12
--- src/usr.sbin/fstyp/fstyp.c:1.11	Wed Jan  1 12:47:19 2020
+++ src/usr.sbin/fstyp/fstyp.c	Thu Jan  2 08:52:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstyp.c,v 1.11 2020/01/01 12:47:19 tkusumi Exp $	*/
+/*	$NetBSD: fstyp.c,v 1.12 2020/01/02 08:52:42 tkusumi Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  *
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: fstyp.c,v 1.11 2020/01/01 12:47:19 tkusumi Exp $");
+__RCSID("$NetBSD: fstyp.c,v 1.12 2020/01/02 08:52:42 tkusumi Exp $");
 
 #include <sys/param.h>
 #include <sys/disklabel.h>
@@ -220,22 +220,6 @@ main(int argc, char **argv)
 	if (setlocale(LC_CTYPE, "") == NULL)
 		err(1, "setlocale");
 
-	/* Cache iconv conversion data before entering capability mode. */
-	if (show_label) {
-		for (i = 0; i < (int)__arraycount(fstypes); i++) {
-			iconv_t cd;
-
-			if (fstypes[i].precache_encoding == NULL)
-				continue;
-			cd = iconv_open("", fstypes[i].precache_encoding);
-			if (cd == (iconv_t)-1)
-				err(1, "%s: iconv_open %s", fstypes[i].name,
-				    fstypes[i].precache_encoding);
-			/* Iconv keeps a small cache of unused encodings. */
-			iconv_close(cd);
-		}
-	}
-
 	/*
 	 * DragonFly: Filesystems may have syntax to decorate path.
 	 * Make a wild guess.

Reply via email to