Changeset View
Changeset View
Standalone View
Standalone View
cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
Show First 20 Lines • Show All 1,013 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
/* | /* | ||||
* We're emulating the system's hostid in userland. | * We're emulating the system's hostid in userland. | ||||
*/ | */ | ||||
return (strtoul(hw_serial, NULL, 10)); | return (strtoul(hw_serial, NULL, 10)); | ||||
} | } | ||||
int | int | ||||
z_uncompress(void *dst, size_t *dstlen, const void *src, size_t srclen) | zz_uncompress(void *dst, size_t *dstlen, const void *src, size_t srclen) | ||||
{ | { | ||||
int ret; | int ret; | ||||
uLongf len = *dstlen; | uLongf len = *dstlen; | ||||
if ((ret = uncompress(dst, &len, src, srclen)) == Z_OK) | if ((ret = z_uncompress(dst, &len, src, srclen)) == Z_OK) | ||||
*dstlen = (size_t)len; | *dstlen = (size_t)len; | ||||
return (ret); | return (ret); | ||||
} | } | ||||
int | int | ||||
z_compress_level(void *dst, size_t *dstlen, const void *src, size_t srclen, | z_compress_level(void *dst, size_t *dstlen, const void *src, size_t srclen, | ||||
int level) | int level) | ||||
{ | { | ||||
int ret; | int ret; | ||||
uLongf len = *dstlen; | uLongf len = *dstlen; | ||||
if ((ret = compress2(dst, &len, src, srclen, level)) == Z_OK) | if ((ret = z_compress2(dst, &len, src, srclen, level)) == Z_OK) | ||||
*dstlen = (size_t)len; | *dstlen = (size_t)len; | ||||
return (ret); | return (ret); | ||||
} | } | ||||
uid_t | uid_t | ||||
crgetuid(cred_t *cr) | crgetuid(cred_t *cr) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines |