aboutsummaryrefslogtreecommitdiff
path: root/sys/libkern
diff options
context:
space:
mode:
authorR. Imura <imura@FreeBSD.org>2005-05-24 15:38:08 +0000
committerR. Imura <imura@FreeBSD.org>2005-05-24 15:38:08 +0000
commitbf8ba9ab3ae9dd0999463c831e35237289e7978f (patch)
tree11de4faee7eb713d70b151f8e61e0ebd951d41eb /sys/libkern
parent5c86e3c106f865a1ecf3d2e8d5bc6257a36fb453 (diff)
downloadsrc-bf8ba9ab3ae9dd0999463c831e35237289e7978f.tar.gz
src-bf8ba9ab3ae9dd0999463c831e35237289e7978f.zip
Fix kiconv on the 64bit plathomes.
- Correct idxp pointer to point the properly address of the each array of the kiconv character conversion tables, so that character conversion work properly when file systems are mounted with kiconv options. - The definition of ICONV_CSMAXDATALEN was also bogus because it was defined as if all machines were 32bit computers. Tested on: amd64 MFC after: 1 month
Notes
Notes: svn path=/head/; revision=146573
Diffstat (limited to 'sys/libkern')
-rw-r--r--sys/libkern/iconv_xlat16.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/libkern/iconv_xlat16.c b/sys/libkern/iconv_xlat16.c
index 68d468ab6808..78e764a86b90 100644
--- a/sys/libkern/iconv_xlat16.c
+++ b/sys/libkern/iconv_xlat16.c
@@ -57,16 +57,16 @@ iconv_xlat16_open(struct iconv_converter_class *dcp,
struct iconv_cspair *csp, struct iconv_cspair *cspf, void **dpp)
{
struct iconv_xlat16 *dp;
- uint32_t *headp, *idxp, dist = 0;
+ uint32_t *headp, **idxp;
int i;
dp = (struct iconv_xlat16 *)kobj_create((struct kobj_class*)dcp, M_ICONV, M_WAITOK);
- headp = idxp = (uint32_t *)csp->cp_data;
- dist = 0x200;
+ headp = (uint32_t *)((caddr_t)csp->cp_data + sizeof(dp->d_table));
+ idxp = (uint32_t **)csp->cp_data;
for (i = 0 ; i < 0x200 ; i++) {
if (*idxp) {
- dp->d_table[i] = headp + dist;
- dist += 0x80;
+ dp->d_table[i] = headp;
+ headp += 0x80;
} else {
dp->d_table[i] = NULL;
}