Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2018 11:23:01 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r340954 - stable/10/sbin/mount_msdosfs
Message-ID:  <201811261123.wAQBN1KK026368@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eugen
Date: Mon Nov 26 11:23:01 2018
New Revision: 340954
URL: https://svnweb.freebsd.org/changeset/base/340954

Log:
  MFC r339816: mount_msdosfs
  
    mount_msdosfs: do not fail mounts requiring locale name conversion table
    that is already present in a kernel statically.
  
    For example, the command "mount_msdosfs -L ru_RU.KOI8-R" fails with error
    "mount_msdosfs: msdosfs_iconv: File exists" for a kernel having
    options LIBICONV and MSDOSFS_ICONV. After this change, it mounts
    successfully.
  
  MFC after:		1 month
  Differential Revision:	https://reviews.freebsd.org/D16951

Modified:
  stable/10/sbin/mount_msdosfs/mount_msdosfs.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/mount_msdosfs/mount_msdosfs.c
==============================================================================
--- stable/10/sbin/mount_msdosfs/mount_msdosfs.c	Mon Nov 26 11:22:04 2018	(r340953)
+++ stable/10/sbin/mount_msdosfs/mount_msdosfs.c	Mon Nov 26 11:23:01 2018	(r340954)
@@ -44,6 +44,7 @@ static const char rcsid[] =
 
 #include <ctype.h>
 #include <err.h>
+#include <errno.h>
 #include <grp.h>
 #include <locale.h>
 #include <pwd.h>
@@ -306,17 +307,17 @@ set_charset(struct iovec **iov, int *iovlen, const cha
 
 	build_iovec_argf(iov, iovlen, "cs_win", ENCODING_UNICODE);
 	error = kiconv_add_xlat16_cspairs(ENCODING_UNICODE, cs_local);
-	if (error)
+	if (error && errno != EEXIST)
 		return (-1);
 	if (cs_dos != NULL) {
 		error = kiconv_add_xlat16_cspairs(cs_dos, cs_local);
-		if (error)
+		if (error && errno != EEXIST)
 			return (-1);
 	} else {
 		build_iovec_argf(iov, iovlen, "cs_dos", cs_local);
 		error = kiconv_add_xlat16_cspair(cs_local, cs_local,
 				KICONV_FROM_UPPER | KICONV_LOWER);
-		if (error)
+		if (error && errno != EEXIST)
 			return (-1);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811261123.wAQBN1KK026368>