[PATCH 34/35] xfsprogs: xfs_db support for sb_utf8version

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

 



From: Ben Myers <bpm@xxxxxxx>

Add support for accessing and setting sb_utf8version to xfs_db.

Signed-off-by: Ben Myers <bpm@xxxxxxx>
---
 db/hash.c | 1 +
 db/sb.c   | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/db/hash.c b/db/hash.c
index 02376e6..5196442 100644
--- a/db/hash.c
+++ b/db/hash.c
@@ -52,6 +52,7 @@ hash_f(
 {
 	xfs_dahash_t	hashval;
 
+	/* XXX utf8version? */
 	hashval = libxfs_da_hashname((uchar_t *)argv[1], (int)strlen(argv[1]));
 	dbprintf("0x%x\n", hashval);
 	return 0;
diff --git a/db/sb.c b/db/sb.c
index 6cb665d..e32790a 100644
--- a/db/sb.c
+++ b/db/sb.c
@@ -119,6 +119,7 @@ const field_t	sb_flds[] = {
 	{ "features_log_incompat", FLDT_UINT32X, OI(OFF(features_log_incompat)),
 		C1, 0, TYP_NONE },
 	{ "crc", FLDT_CRC, OI(OFF(crc)), C1, 0, TYP_NONE },
+	{ "utf8version", FLDT_UINT32D, OI(OFF(utf8version)), C1, 0, TYP_NONE },
 	{ "pquotino", FLDT_INO, OI(OFF(pquotino)), C1, 0, TYP_INODE },
 	{ "lsn", FLDT_UINT64X, OI(OFF(lsn)), C1, 0, TYP_NONE },
 	{ NULL }
@@ -646,6 +647,8 @@ version_string(
 		strcat(s, ",CRC");
 	if (xfs_sb_version_hasftype(sbp))
 		strcat(s, ",FTYPE");
+	if (xfs_sb_version_hasutf8(sbp))
+		strcat(s, ",UTF8");
 	return s;
 }
 
-- 
1.7.12.4

--
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