Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1911068rwl; Mon, 26 Dec 2022 06:30:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXuddTPEtWVet+zIhn0P4fI1iMBKeM42vf9geVHS2LFcKvTLUteAIJjjLgQeCgdVLoS6d7U2 X-Received: by 2002:a17:906:f117:b0:7c1:9aa2:a36d with SMTP id gv23-20020a170906f11700b007c19aa2a36dmr19092623ejb.5.1672065027239; Mon, 26 Dec 2022 06:30:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672065027; cv=none; d=google.com; s=arc-20160816; b=bJivrN77AiqgQE/AHRWIOe4xzYzpVAENautWLGXrHwKii98Sz8TGP0OetxriHM36v1 32o+2Yb20m1J6h8FVrZMaPW74SxRoZ1lG3hQkH+IPe4QBGef0yz71xtPWl8GO2UmXV1s gCLErn7MLQ84C5C/JgQ8WZboDgWbYl8dMWGLHPGcZx8RMyctDOvoGiqrMB/xLqHI9i/G U42hfgXHK6SISXRC7wQKJ+O1doCrPGJFSMsTEEe97h/Q4c3ZYTAdcoyvPIsy51cqQwjq iR65PMgRN/PfDz7DCNjnlJD+3V+HhKIXxOk1/21INQfGiuvjzMr1y59HokGp9jNEmyg7 TBTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=gM0A1RKPObxIv7uC6clriFUFFYjgYQDepx03XR8wsv0=; b=AOnjx9tvElyeAIlYFy9fF+iaAdAs5fDjTSwfgKWeBCeMIUNx1p/VUr1AkNESpkTxpH 5NgREASdxu07u83IKdz++n30lFySqfHxDzPmxvLfikt9p9ByiYUUfJee6P13rNkP0Ain wzZ0rsMhINlrf1TPo1sD5cQqLMF850JzoRJNQRFCHSfDsF8z1QzduacG3iaDbivFhd9j rh8SJPcY8drFSVmbBWRZ7uDG08Xa3AWAfp4NczLvnagcG2Zjatza3hBZNMjv1U8UqAxb HCuMtY5PmZnWPB4QDO4BalsIgITZduAzFtQ6XCAhDgP1EGUmHfqOmQ6VJ9GMCcguPFhP daew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N7GrMIig; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xi1-20020a170906dac100b0080e1b35ebbcsi9223493ejb.453.2022.12.26.06.30.11; Mon, 26 Dec 2022 06:30:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N7GrMIig; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232004AbiLZOWO (ORCPT + 67 others); Mon, 26 Dec 2022 09:22:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231609AbiLZOWG (ORCPT ); Mon, 26 Dec 2022 09:22:06 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D4982182; Mon, 26 Dec 2022 06:22:05 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3ABD160EA0; Mon, 26 Dec 2022 14:22:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77E67C4339B; Mon, 26 Dec 2022 14:22:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672064524; bh=BEzrRcBKQ+GZ/U+aeCEg9n4Pdy0ikdO5wXFWpAtXmSg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=N7GrMIigC6HxWNrAVct3befoFSSCxU8We3pVOw0O7RzGrspOaLS7OpPHudv168XAA 25iLUs0PGQXhlSEnFpoMuteXkAvUDuXi2F3q5Ilj3JLvHTC0foaYVDx8XDUHW+FfEn lqCyqB5hNS+kNb4YFZ9eV4RnkF0iFaa4JEVF30ZkqOMn2UQsHeJ+XlEW0A0kdXjKtc Xnn089Q0lcPPNDHVVs8gb8ZCLt1Gr/wpy2bnawgEal9zvN7aQIAwzliJYz0B7WrevK JgvI5+UbqzqVfOzTHbOeRJ2Ud40GRBYxGQlvQ1bcYt2Piyv+6jvwF/w1hr47ANYy2v ugCvYxfnZppOg== Received: by pali.im (Postfix) id 46DDAA32; Mon, 26 Dec 2022 15:22:02 +0100 (CET) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: linux-fsdevel@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, linux-cifs@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org, Alexander Viro , Jan Kara , "Theodore Y . Ts'o" , Anton Altaparmakov , OGAWA Hirofumi , Luis de Bethencourt , Salah Triki , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Dave Kleikamp , Andrew Morton , Pavel Machek , Christoph Hellwig , Kari Argillander , Viacheslav Dubeyko Subject: [RFC PATCH v2 02/18] hfsplus: Add iocharset= mount option as alias for nls= Date: Mon, 26 Dec 2022 15:21:34 +0100 Message-Id: <20221226142150.13324-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20221226142150.13324-1-pali@kernel.org> References: <20221226142150.13324-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Other fs drivers are using iocharset= mount option for specifying charset. So add it also for hfsplus and mark old nls= mount option as deprecated. Signed-off-by: Pali Rohár --- Documentation/filesystems/hfsplus.rst | 3 +++ fs/hfsplus/options.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/filesystems/hfsplus.rst b/Documentation/filesystems/hfsplus.rst index f02f4f5fc020..171805304cc2 100644 --- a/Documentation/filesystems/hfsplus.rst +++ b/Documentation/filesystems/hfsplus.rst @@ -50,6 +50,9 @@ When mounting an HFSPlus filesystem, the following options are accepted: or locked. Use at your own risk. nls=cccc + Deprecated alias for ``iocharset=`` mount option. + + iocharset=cccc Encoding to use when presenting file names. diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c index c94a58762ad6..d3dc0d4ba77f 100644 --- a/fs/hfsplus/options.c +++ b/fs/hfsplus/options.c @@ -23,6 +23,7 @@ enum { opt_creator, opt_type, opt_umask, opt_uid, opt_gid, opt_part, opt_session, opt_nls, + opt_iocharset, opt_nodecompose, opt_decompose, opt_barrier, opt_nobarrier, opt_force, opt_err @@ -37,6 +38,7 @@ static const match_table_t tokens = { { opt_part, "part=%u" }, { opt_session, "session=%u" }, { opt_nls, "nls=%s" }, + { opt_iocharset, "iocharset=%s" }, { opt_decompose, "decompose" }, { opt_nodecompose, "nodecompose" }, { opt_barrier, "barrier" }, @@ -170,6 +172,9 @@ int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi) } break; case opt_nls: + pr_warn("option nls= is deprecated, use iocharset=\n"); + fallthrough; + case opt_iocharset: if (sbi->nls) { pr_err("unable to change nls mapping\n"); return 0; @@ -234,7 +239,7 @@ int hfsplus_show_options(struct seq_file *seq, struct dentry *root) if (sbi->session >= 0) seq_printf(seq, ",session=%u", sbi->session); if (sbi->nls) - seq_printf(seq, ",nls=%s", sbi->nls->charset); + seq_printf(seq, ",iocharset=%s", sbi->nls->charset); if (test_bit(HFSPLUS_SB_NODECOMPOSE, &sbi->flags)) seq_puts(seq, ",nodecompose"); if (test_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags)) -- 2.20.1