Bug 216813 - mount_msdosfs: regression in handling the -L flag
Summary: mount_msdosfs: regression in handling the -L flag
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.3-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Keywords: patch, regression
Depends on:
Reported: 2017-02-05 08:22 UTC by Mikhail Teterin
Modified: 2017-09-01 01:44 UTC (History)
1 user (show)

See Also:

Work-around (892 bytes, patch)
2017-02-05 08:22 UTC, Mikhail Teterin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Teterin freebsd_committer 2017-02-05 08:22:13 UTC
Created attachment 179628 [details]

Trying to mount an MS-DOS formatted USB-stick with

% mount_msdosfs -D utf8 -L uk_UA.KOI8-U /dev/da4 /mnt

fails with:

mount_msdosfs: msdosfs_iconv: File exists

(As it used to in 2008, see Bug 129720). After the command exits, the  msdosfs_iconv.ko is listed by kldstat. So, something loads it, then tries to load it again and fails.

The attached patch provides a work-around for mount_msdosfs(8) -- this allowed me to mount the device in a hurry. However, I suspect, it is the kiconv_add_xlat16_cspairs(3), that needs fixing instead.
Comment 1 Conrad Meyer freebsd_committer 2017-02-15 05:01:03 UTC
Seems to work fine on CURRENT:
$ dd if=/dev/zero of=./testfs.img bs=1m count=50
$ sudo mdconfig -a -t vnode -f testfs.img
$ sudo newfs_msdos /dev/md0
$ mkdir mnt
$ sudo truss -o truss.log mount_msdosfs -D utf8 -L uk_UA.KOI8-U /dev/md0 ./mnt
$ echo $?
Comment 2 Mikhail Teterin freebsd_committer 2017-02-15 06:00:04 UTC
From somebody else's report (http://forum.lissyara.su/viewtopic.php?t=44099), it would seem, the problem is triggered by the:


in kernel-config. I do not have that here, but I do have `options LIBICONV'

My problems were on 10.3, though, not CURRENT.