Changeset View
Changeset View
Standalone View
Standalone View
cddl/compat/opensolaris/misc/zmount.c
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
#include <mnttab.h> | #include <mnttab.h> | ||||
static void | static void | ||||
build_iovec(struct iovec **iov, int *iovlen, const char *name, void *val, | build_iovec(struct iovec **iov, int *iovlen, const char *name, void *val, | ||||
size_t len) | size_t len) | ||||
{ | { | ||||
int i; | int i; | ||||
if (*iovlen < 0) | if (*iovlen < 0 || *name == '\0') | ||||
imp: this is holding until after we land OpenZFS and won' tbe in this commit. | |||||
return; | return; | ||||
i = *iovlen; | i = *iovlen; | ||||
*iov = realloc(*iov, sizeof(**iov) * (i + 2)); | *iov = realloc(*iov, sizeof(**iov) * (i + 2)); | ||||
if (*iov == NULL) { | if (*iov == NULL) { | ||||
*iovlen = -1; | *iovlen = -1; | ||||
return; | return; | ||||
} | } | ||||
(*iov)[i].iov_base = strdup(name); | (*iov)[i].iov_base = strdup(name); | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |
this is holding until after we land OpenZFS and won' tbe in this commit.