summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-04-01 17:00:06 +0000
committerbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-04-01 17:00:06 +0000
commit0998fdd6dba7a360131c2addecc8b2d4dc9b7f4a (patch)
tree808447510c0da5c7cd4cf14e58336aa859293946
parent6a585c61de0f3fa369ed7a011e27f94226232562 (diff)
Apparently it's OK for done to be NULL, which was not clear in the
Solaris man page. Anyway, since apparently this usage is accectable I've updated the function to handle it. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@63 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
-rw-r--r--include/sys/vmsystm.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h
index 568cb3775..fb9ff9710 100644
--- a/include/sys/vmsystm.h
+++ b/include/sys/vmsystm.h
@@ -37,6 +37,8 @@ copyout(const void *from, void *to, size_t len)
static __inline__ int
copyinstr(const void *from, void *to, size_t len, size_t *done)
{
+ size_t rc;
+
if (len == 0)
return -ENAMETOOLONG;
@@ -46,7 +48,9 @@ copyinstr(const void *from, void *to, size_t len, size_t *done)
/* XXX: Should return ENAMETOOLONG if 'strlen(from) > len' */
memset(to, 0, len);
- *done = copyin(from, to, len - 1);
+ rc = copyin(from, to, len - 1);
+ if (done != NULL)
+ *done = rc;
return 0;
}