diff options
author | takawata <takawata@FreeBSD.org> | 2005-05-04 15:05:46 +0000 |
---|---|---|
committer | takawata <takawata@FreeBSD.org> | 2005-05-04 15:05:46 +0000 |
commit | a61ec3d8166cdedc2125146e2644135d395e23d0 (patch) | |
tree | 216a2f442d29ae72f28b9372fd875634a1915745 /contrib | |
parent | ad22e93c3e76a385b3c7daf033526a631da450d2 (diff) | |
download | FreeBSD-src-a61ec3d8166cdedc2125146e2644135d395e23d0.zip FreeBSD-src-a61ec3d8166cdedc2125146e2644135d395e23d0.tar.gz |
Make smbfs capable to use 16bit char set in filenames.
PR:78110
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/smbfs/lib/smb/ctx.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/contrib/smbfs/lib/smb/ctx.c b/contrib/smbfs/lib/smb/ctx.c index 7a8d858..530cbb8 100644 --- a/contrib/smbfs/lib/smb/ctx.c +++ b/contrib/smbfs/lib/smb/ctx.c @@ -473,8 +473,6 @@ smb_ctx_resolve(struct smb_ctx *ctx) struct sockaddr *sap; struct sockaddr_nb *salocal, *saserver; char *cp; - u_char cstbl[256]; - u_int i; int error = 0; ctx->ct_flags &= ~SMBCF_RESOLVED; @@ -496,7 +494,7 @@ smb_ctx_resolve(struct smb_ctx *ctx) if (error) return error; if (ssn->ioc_localcs[0] == 0) - strcpy(ssn->ioc_localcs, "default"); /* XXX: locale name ? */ + strcpy(ssn->ioc_localcs, "ISO8859-1"); error = smb_addiconvtbl("tolower", ssn->ioc_localcs, nls_lower); if (error) return error; @@ -504,18 +502,9 @@ smb_ctx_resolve(struct smb_ctx *ctx) if (error) return error; if (ssn->ioc_servercs[0] != 0) { - for(i = 0; i < sizeof(cstbl); i++) - cstbl[i] = i; - nls_mem_toext(cstbl, cstbl, sizeof(cstbl)); - error = smb_addiconvtbl(ssn->ioc_servercs, ssn->ioc_localcs, cstbl); - if (error) - return error; - for(i = 0; i < sizeof(cstbl); i++) - cstbl[i] = i; - nls_mem_toloc(cstbl, cstbl, sizeof(cstbl)); - error = smb_addiconvtbl(ssn->ioc_localcs, ssn->ioc_servercs, cstbl); - if (error) - return error; + error = kiconv_add_xlat16_cspairs + (ssn->ioc_localcs, ssn->ioc_servercs); + if (error) return error; } if (ctx->ct_srvaddr) { error = nb_resolvehost_in(ctx->ct_srvaddr, &sap); |