Re: [PATCH 7/7] XFS: NLS config option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 03 Apr 2008 11:26:10 +1000, Josef 'Jeff' Sipek <jeffpc@xxxxxxxxxxxxxx> wrote:

On Wed, Apr 02, 2008 at 04:25:15PM +1000, Barry Naujok wrote:
This optional patch implements the NLS support as a CONFIG option.

Any reason this is a separate patch, and not part of the previous patches?

...
--- kern_ci.orig/fs/xfs/Kconfig
+++ kern_ci/fs/xfs/Kconfig
@@ -87,6 +87,16 @@ config XFS_UNICODE

 	  If you don't require UTF-8 enforcement, say N.

+config XFS_UNICODE_NLS
+	bool "XFS NLS Unicode support
+	depends on XFS_UNICODE
+	help
+	  NLS (Native Language Support) allows non-UTF8 locales to
+	  interact with XFS Unicode support. To specify the character
+	  set being used, use the "-n nls=<charset>" mount option.

"mount option"? Or was that supposed to say mkfs?

Hmm... typo: "-o nls=<charset>" in mount :)

from mount(8) manpage:

       -n     Mount without writing in /etc/mtab.  This is necessary for
              example when /etc is on a read-only file system.

...
Index: kern_ci/fs/xfs/xfs_unicode.h
===================================================================
--- kern_ci.orig/fs/xfs/xfs_unicode.h
+++ kern_ci/fs/xfs/xfs_unicode.h
@@ -65,6 +65,8 @@ int xfs_unicode_validate(const uchar_t *
 int xfs_unicode_read_cft(struct xfs_mount *mp);
 void xfs_unicode_free_cft(const xfs_cft_t *cft);

+#ifdef CONFIG_XFS_UNICODE_NLS
+
 #define xfs_is_using_nls(mp)	((mp)->m_nls != NULL)

 int xfs_unicode_to_nls(struct xfs_mount *mp, const uchar_t *uni_name,
@@ -73,7 +75,20 @@ int xfs_nls_to_unicode(struct xfs_mount
 		int nls_namelen, const uchar_t **uni_name, int *uni_namelen);
void xfs_unicode_nls_free(const uchar_t *src_name, const uchar_t *conv_name);

-#else
+#else /* CONFIG_XFS_UNICODE_NLS */
+
+#define xfs_is_using_nls(mp)		0
+
+#define xfs_unicode_to_nls(mp, uname, ulen, pnname, pnlen) \
+		((*(pnname)) = (uname), (*(pnlen)) = (ulen), 0)
+#define xfs_nls_to_unicode(mp, nname, nlen, puname, pulen) \
+		((*(puname)) = (nname), (*(pulen)) = (nlen), \
+		 xfs_unicode_validate(nname, nlen))

While I commend your use of the comma operator, I really think those should
be static inlines :)

Josef 'Jeff' Sipek.



--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux