Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2040156pxt; Sun, 8 Aug 2021 09:27:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj2393A0X/S5aMTt87t52nXQQ/JL8e6xLwzVTcWQ4+52uxqYXc6m8OBkyIWCC3fnpWEFg6 X-Received: by 2002:aa7:c603:: with SMTP id h3mr24582473edq.165.1628440044893; Sun, 08 Aug 2021 09:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628440044; cv=none; d=google.com; s=arc-20160816; b=XXc3XMwVrpU9nQMGCpiB5JEPAP2lRn41UsqbelCwvezh8KpPzNrN+X8q5utI91lO4s uW/7vU512juDkznGL1bciRVhkefhQ6j++Qt5dqOSOtdhOXtFvyX5ws2kSN6M0aWzFQmV 2VenvvJ/+AV2bVaHZuyZYciWiHq2yGxw5ZBWkfcibTcAzZFEShteUxyPsauZe6HPTA7v j3JVFUQd93A3GCOFuJHELh4tvOqfnijsYm8EHRvj1kTf7CWjdy/5mJ7zk5myivL8Ym2t jyG/A9BFMKM6HQG2eZFqj1K41eGt+Y+lFWpJBSDSWFtSnolm8hFNxGFnmjPBUSwjFKld /Pxg== 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=U4XPtNtIifzqxc02m3sbCM2ZQI0SeFr/8gLzRttx5dA=; b=c9vSv4Gfbo/LgdEYAMD0GQQtChXuA7fhI+G5r6DShEfPSDSZeeRdutJhrziVKpCSjO RI4sPsxd5x7U9ATmJtVRvEPTt2bnbSiYU+7aVKrkwljbHJQ2DiSsek/+cO68K2iPyM1p 5flZyYip24PXne0EvTtT2Tp6KRfr87aECxu7I7nkLFPa9b+lSBfq/C+hzAiwoZjMCteV Q7Nj66FogmKbRuncUU8Ny7SGiYEMhu/tFU/HZB6B0MQttRWWzAONuI8xHT5MDUum/Vt4 ErsagQF5iViN7c+/zcY7FtXpAlGov/GzMweGifkmRQxAQpwyJyAuS/ehRXB/vlxfIWVE Baeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hOZn2eQC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw17si14036446ejb.662.2021.08.08.09.27.01; Sun, 08 Aug 2021 09:27:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hOZn2eQC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231990AbhHHQZj (ORCPT + 99 others); Sun, 8 Aug 2021 12:25:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:47282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230049AbhHHQZe (ORCPT ); Sun, 8 Aug 2021 12:25:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5A3DC61019; Sun, 8 Aug 2021 16:25:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628439915; bh=SvKOqyPaGSzoaIcYwQ0yRxDdigaErxC/HKUfKX6Zrtc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hOZn2eQCBH07F4do1hg8Lbo8/EGitk9c3nGslXaoXHoJxnwmVTzTopeoh/i5A+dRz +hQyiLFU/vjmhXfbIJewjGg1jkhXeGsEnpxngLTaIgA59xilyJ2ZFZye8CkUDUtfOV 3WRkf9aeq56MTG9sEJInu+TH1/yNQcfq32ljdAb0Y69r8mgh12oytPhYvL7poh9Cd6 o6xss5RH6D72UXPJugRdVHUOczcg8p3OVR2VzGag1zeGHAsfFd46hap86mxOCoAiBG nWf2ZYxdARW30jDLeuJ/JON5j5ccLn85rtPTgzuUrjPA7YinjA1o3XKOlPrpewC1Y/ AGayuPIIx4VMA== Received: by pali.im (Postfix) id 730F21545; Sun, 8 Aug 2021 18:25:13 +0200 (CEST) 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 , OGAWA Hirofumi , "Theodore Y . Ts'o" , Luis de Bethencourt , Salah Triki , Andrew Morton , Dave Kleikamp , Anton Altaparmakov , Pavel Machek , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Christoph Hellwig Subject: [RFC PATCH 02/20] hfsplus: Add iocharset= mount option as alias for nls= Date: Sun, 8 Aug 2021 18:24:35 +0200 Message-Id: <20210808162453.1653-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210808162453.1653-1-pali@kernel.org> References: <20210808162453.1653-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- fs/hfsplus/options.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c index 047e05c57560..a975548f6b91 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" }, @@ -166,6 +168,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; @@ -230,7 +235,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