Print this page
NEX-16818 Add fksmbcl development tool
NEX-17264 SMB client test tp_smbutil_013 fails after NEX-14666
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
and: (fix ref leaks)
SMB-50 User-mode SMB server
Includes work by these authors:
Thomas Keiser <thomas.keiser@nexenta.com>
Albert Lee <trisk@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/lib/libfakekernel/common/copy.c
+++ new/usr/src/lib/libfakekernel/common/copy.c
1 1 /*
2 2 * This file and its contents are supplied under the terms of the
|
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
3 3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 4 * You may only use this file in accordance with the terms of version
5 5 * 1.0 of the CDDL.
6 6 *
7 7 * A full copy of the text of the CDDL should have accompanied this
8 8 * source. A copy of the CDDL is also available via the Internet at
9 9 * http://www.illumos.org/license/CDDL.
10 10 */
11 11
12 12 /*
13 - * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
13 + * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
14 14 */
15 15
16 16
17 17 #include <sys/types.h>
18 18 #include <sys/time.h>
19 19 #include <sys/systm.h>
20 20 #include <sys/errno.h>
21 21
22 22 int
23 +copyin(const void *u, void *k, size_t s)
24 +{
25 + bcopy(u, k, s);
26 + return (0);
27 +}
28 +
29 +int
30 +copyout(const void *k, void *u, size_t s)
31 +{
32 + bcopy(k, u, s);
33 + return (0);
34 +}
35 +
36 +int
23 37 copyinstr(const char *src, char *dst, size_t max_len, size_t *copied)
24 38 {
25 39 return (copystr(src, dst, max_len, copied));
26 40 }
27 41
28 42 int
29 43 copystr(const char *src, char *dst, size_t max_len, size_t *outlen)
30 44 {
31 45 size_t copied;
32 46
33 47 if (max_len == 0)
34 48 return (ENAMETOOLONG);
35 49
36 50 copied = strlcpy(dst, src, max_len) + 1;
37 51 if (copied >= max_len)
38 52 return (ENAMETOOLONG);
39 53
|
↓ open down ↓ |
7 lines elided |
↑ open up ↑ |
40 54 if (outlen != NULL)
41 55 *outlen = copied;
42 56
43 57 return (0);
44 58 }
45 59
46 60 void
47 61 ovbcopy(const void *src, void *dst, size_t len)
48 62 {
49 63 (void) memmove(dst, src, len);
64 +}
65 +
66 +/* ARGSUSED */
67 +int
68 +ddi_copyin(const void *buf, void *kernbuf, size_t size, int flags)
69 +{
70 + return (copyin(buf, kernbuf, size));
71 +}
72 +
73 +/* ARGSUSED */
74 +int
75 +ddi_copyout(const void *buf, void *kernbuf, size_t size, int flags)
76 +{
77 + return (copyout(buf, kernbuf, size));
50 78 }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX