Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754194AbcCWIRV (ORCPT ); Wed, 23 Mar 2016 04:17:21 -0400 Received: from mail-io0-f182.google.com ([209.85.223.182]:35102 "EHLO mail-io0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753537AbcCWIRO (ORCPT ); Wed, 23 Mar 2016 04:17:14 -0400 MIME-Version: 1.0 In-Reply-To: <56DED942.3060900@maciej.szmigiero.name> References: <56DED942.3060900@maciej.szmigiero.name> Date: Wed, 23 Mar 2016 09:17:13 +0100 X-Google-Sender-Auth: 1rD04HDkeNv4gbmttm5puwVUbno Message-ID: Subject: Re: [PATCHv2] fat: add config option to set UTF-8 mount option by default From: Geert Uytterhoeven To: "Maciej S. Szmigiero" Cc: OGAWA Hirofumi , Jonathan Corbet , "linux-doc@vger.kernel.org" , linux-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2495 Lines: 62 On Tue, Mar 8, 2016 at 2:53 PM, Maciej S. Szmigiero wrote: > FAT has long supported its own default file name encoding > config setting, separate from CONFIG_NLS_DEFAULT. > > However, if UTF-8 encoded file names are desired FAT > character set should not be set to utf8 since this would > make file names case sensitive even if case insensitive > matching is requested. > Instead, "utf8" mount options should be provided to enable > UTF-8 file names in FAT file system. > > Unfortunately, there was no possibility to set the default > value of this option so on UTF-8 system "utf8" mount option > had to be added manually to most FAT mounts. > > This patch adds config option to set such default value. > > Signed-off-by: Maciej S. Szmigiero > --- a/fs/fat/Kconfig > +++ b/fs/fat/Kconfig > @@ -93,8 +93,24 @@ config FAT_DEFAULT_IOCHARSET > that most of your FAT filesystems use, and can be overridden > with the "iocharset" mount option for FAT filesystems. > Note that "utf8" is not recommended for FAT filesystems. > - If unsure, you shouldn't set "utf8" here. > + If unsure, you shouldn't set "utf8" here - select the next option > + instead if you would like to use UTF-8 encoded file names by default. > See for more information. > > Enable any character sets you need in File Systems/Native Language > Support. > + > +config FAT_DEFAULT_UTF8 > + bool "Enable FAT UTF-8 option by default" > + depends on VFAT_FS > + default n > + help > + Set this if you would like to have "utf8" mount option set > + by default when mounting FAT filesystems. > + > + Even if you say Y here can always disable UTF-8 for > + particular mount by adding "utf8=0" to mount options. > + > + Say Y if you use UTF-8 encoding for file names, N otherwise. > + > + See for more information. What's the recommended value of CONFIG_FAT_DEFAULT_UTF8 for a (distro) defconfig? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds