diff options
author | Vyacheslav Dubeyko <slava@dubeyko.com> | 2013-02-27 20:03:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-27 22:10:10 -0500 |
commit | 324ef39a8a4f693035d63527f16100ed27310ecc (patch) | |
tree | 1814515cf6139fe1b4ebae8d6641c9ec6293d396 /fs/hfsplus/bnode.c | |
parent | 127e5f5ae51eff44c9bff673f24e8587caa4e29f (diff) |
hfsplus: add support of manipulation by attributes file
Add support of manipulation by attributes file.
Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Reported-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfsplus/bnode.c')
-rw-r--r-- | fs/hfsplus/bnode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index 1c42cc5b899f..5c125ce6bd72 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c | |||
@@ -62,7 +62,8 @@ void hfs_bnode_read_key(struct hfs_bnode *node, void *key, int off) | |||
62 | 62 | ||
63 | tree = node->tree; | 63 | tree = node->tree; |
64 | if (node->type == HFS_NODE_LEAF || | 64 | if (node->type == HFS_NODE_LEAF || |
65 | tree->attributes & HFS_TREE_VARIDXKEYS) | 65 | tree->attributes & HFS_TREE_VARIDXKEYS || |
66 | node->tree->cnid == HFSPLUS_ATTR_CNID) | ||
66 | key_len = hfs_bnode_read_u16(node, off) + 2; | 67 | key_len = hfs_bnode_read_u16(node, off) + 2; |
67 | else | 68 | else |
68 | key_len = tree->max_key_len + 2; | 69 | key_len = tree->max_key_len + 2; |
@@ -314,7 +315,8 @@ void hfs_bnode_dump(struct hfs_bnode *node) | |||
314 | if (i && node->type == HFS_NODE_INDEX) { | 315 | if (i && node->type == HFS_NODE_INDEX) { |
315 | int tmp; | 316 | int tmp; |
316 | 317 | ||
317 | if (node->tree->attributes & HFS_TREE_VARIDXKEYS) | 318 | if (node->tree->attributes & HFS_TREE_VARIDXKEYS || |
319 | node->tree->cnid == HFSPLUS_ATTR_CNID) | ||
318 | tmp = hfs_bnode_read_u16(node, key_off) + 2; | 320 | tmp = hfs_bnode_read_u16(node, key_off) + 2; |
319 | else | 321 | else |
320 | tmp = node->tree->max_key_len + 2; | 322 | tmp = node->tree->max_key_len + 2; |