From owner-svn-src-stable@freebsd.org Mon Nov 26 11:20:26 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A3EE115590E; Mon, 26 Nov 2018 11:20:26 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2FE26DAF6; Mon, 26 Nov 2018 11:20:25 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9451A2E81; Mon, 26 Nov 2018 11:20:25 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBKPxW021732; Mon, 26 Nov 2018 11:20:25 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBKPlE021731; Mon, 26 Nov 2018 11:20:25 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261120.wAQBKPlE021731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 11:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r340952 - stable/12/sbin/mount_msdosfs X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sbin/mount_msdosfs X-SVN-Commit-Revision: 340952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B2FE26DAF6 X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:20:26 -0000 Author: eugen Date: Mon Nov 26 11:20:25 2018 New Revision: 340952 URL: https://svnweb.freebsd.org/changeset/base/340952 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/12/sbin/mount_msdosfs/mount_msdosfs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/mount_msdosfs/mount_msdosfs.c ============================================================================== --- stable/12/sbin/mount_msdosfs/mount_msdosfs.c Mon Nov 26 11:17:12 2018 (r340951) +++ stable/12/sbin/mount_msdosfs/mount_msdosfs.c Mon Nov 26 11:20:25 2018 (r340952) @@ -46,6 +46,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -308,17 +309,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); }