diff options
Diffstat (limited to 'fs/hfs/string.c')
-rw-r--r-- | fs/hfs/string.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/hfs/string.c b/fs/hfs/string.c index 927a5af79428..495a976a3cc9 100644 --- a/fs/hfs/string.c +++ b/fs/hfs/string.c | |||
@@ -51,7 +51,8 @@ static unsigned char caseorder[256] = { | |||
51 | /* | 51 | /* |
52 | * Hash a string to an integer in a case-independent way | 52 | * Hash a string to an integer in a case-independent way |
53 | */ | 53 | */ |
54 | int hfs_hash_dentry(struct dentry *dentry, struct qstr *this) | 54 | int hfs_hash_dentry(const struct dentry *dentry, const struct inode *inode, |
55 | struct qstr *this) | ||
55 | { | 56 | { |
56 | const unsigned char *name = this->name; | 57 | const unsigned char *name = this->name; |
57 | unsigned int hash, len = this->len; | 58 | unsigned int hash, len = this->len; |
@@ -92,21 +93,21 @@ int hfs_strcmp(const unsigned char *s1, unsigned int len1, | |||
92 | * Test for equality of two strings in the HFS filename character ordering. | 93 | * Test for equality of two strings in the HFS filename character ordering. |
93 | * return 1 on failure and 0 on success | 94 | * return 1 on failure and 0 on success |
94 | */ | 95 | */ |
95 | int hfs_compare_dentry(struct dentry *dentry, struct qstr *s1, struct qstr *s2) | 96 | int hfs_compare_dentry(const struct dentry *parent, const struct inode *pinode, |
97 | const struct dentry *dentry, const struct inode *inode, | ||
98 | unsigned int len, const char *str, const struct qstr *name) | ||
96 | { | 99 | { |
97 | const unsigned char *n1, *n2; | 100 | const unsigned char *n1, *n2; |
98 | int len; | ||
99 | 101 | ||
100 | len = s1->len; | ||
101 | if (len >= HFS_NAMELEN) { | 102 | if (len >= HFS_NAMELEN) { |
102 | if (s2->len < HFS_NAMELEN) | 103 | if (name->len < HFS_NAMELEN) |
103 | return 1; | 104 | return 1; |
104 | len = HFS_NAMELEN; | 105 | len = HFS_NAMELEN; |
105 | } else if (len != s2->len) | 106 | } else if (len != name->len) |
106 | return 1; | 107 | return 1; |
107 | 108 | ||
108 | n1 = s1->name; | 109 | n1 = str; |
109 | n2 = s2->name; | 110 | n2 = name->name; |
110 | while (len--) { | 111 | while (len--) { |
111 | if (caseorder[*n1++] != caseorder[*n2++]) | 112 | if (caseorder[*n1++] != caseorder[*n2++]) |
112 | return 1; | 113 | return 1; |