summaryrefslogtreecommitdiffstats
path: root/sys/netncp
diff options
context:
space:
mode:
authorimura <imura@FreeBSD.org>2005-07-29 13:22:37 +0000
committerimura <imura@FreeBSD.org>2005-07-29 13:22:37 +0000
commit3c148b71eb7204eb8ec0f9a9dc000571f0e9730f (patch)
tree549cc36b1d29a5047dca121ca0e375b41b375c0c /sys/netncp
parentbea55b64d3f045f1f8013655fd5e3b78e98673a0 (diff)
downloadFreeBSD-src-3c148b71eb7204eb8ec0f9a9dc000571f0e9730f.zip
FreeBSD-src-3c148b71eb7204eb8ec0f9a9dc000571f0e9730f.tar.gz
Change API of mb_copy_t in libmchain so that netsmb can handle
multibyte character share name correctly. Reviewed by: bp
Diffstat (limited to 'sys/netncp')
-rw-r--r--sys/netncp/ncp_rq.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/netncp/ncp_rq.c b/sys/netncp/ncp_rq.c
index 6915bfa..b637c9a 100644
--- a/sys/netncp/ncp_rq.c
+++ b/sys/netncp/ncp_rq.c
@@ -151,8 +151,18 @@ ncp_rq_done(struct ncp_rq *rqp)
*/
static int
-ncp_rq_pathstrhelp(struct mbchain *mbp, c_caddr_t src, caddr_t dst, size_t len)
+ncp_rq_pathstrhelp(struct mbchain *mbp, c_caddr_t src, caddr_t dst,
+ size_t *srclen, size_t *dstlen)
{
+ int len;
+
+ if (*srclen < *dstlen) {
+ *dstlen = *srclen;
+ len = (int)*srclen;
+ } else {
+ *srclen = *dstlen;
+ len = (int)*dstlen;
+ }
ncp_pathcopy(src, dst, len, mbp->mb_udata);
return 0;
}
OpenPOWER on IntegriCloud