Lines Matching defs:buf

246 zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf, size_t len,
259 (void) strlcpy(buf, zpool_get_name(zhp), len);
263 (void) strlcpy(buf,
269 (void) snprintf(buf, len, "%llu", intval);
277 (void) strlcpy(buf,
284 (void) strlcpy(buf, "-", len);
299 (void) strlcpy(buf, zpool_get_prop_string(zhp, prop, &src),
313 (void) snprintf(buf, len, "%llu",
316 (void) zfs_nicenum(intval, buf, len);
323 (void) strlcpy(buf, "-", len);
325 (void) snprintf(buf, len, "%llu",
328 (void) zfs_nicenum(intval, buf, len);
333 (void) snprintf(buf, len, "%llu",
336 (void) snprintf(buf, len, "%llu%%",
342 (void) strlcpy(buf, "-", len);
344 (void) snprintf(buf, len, "%llu%%",
349 (void) snprintf(buf, len, "%llu.%02llux",
360 (void) strlcpy(buf, zpool_state_to_name(intval,
365 (void) snprintf(buf, len, "-");
370 (void) snprintf(buf, len, "%llu", intval);
379 (void) strlcpy(buf, strval, len);
745 char buf[ZFS_MAXPROPLEN];
823 zpool_get_prop(zhp, entry->pl_prop, buf, sizeof (buf),
825 if (strlen(buf) > entry->pl_width)
826 entry->pl_width = strlen(buf);
837 zpool_prop_get_feature(zpool_handle_t *zhp, const char *propname, char *buf,
860 (void) strlcpy(buf, "-", len);
871 (void) strlcpy(buf, ZFS_FEATURE_DISABLED, len);
874 (void) strlcpy(buf, ZFS_FEATURE_ENABLED, len);
876 (void) strlcpy(buf, ZFS_FEATURE_ACTIVE, len);
881 (void) strcpy(buf, ZFS_UNSUPPORTED_INACTIVE);
883 (void) strcpy(buf, ZFS_UNSUPPORTED_READONLY);
886 (void) strlcpy(buf, "-", len);
902 * 'buf'.
1220 char buf[64];
1222 zfs_nicenum(SPA_MINDEVSIZE, buf, sizeof (buf));
1226 "minimum size (%s)"), buf);
1406 char buf[64];
1408 zfs_nicenum(SPA_MINDEVSIZE, buf, sizeof (buf));
1412 "size (%s)"), buf);
2362 char buf[MAXPATHLEN];
2375 (void) snprintf(buf, sizeof (buf), "%s%s", _PATH_DEV, path);
2376 verify(nvlist_add_string(search, ZPOOL_CONFIG_PATH, buf) == 0);
3628 char buf[64];
3646 (void) snprintf(buf, sizeof (buf), "%llu",
3648 path = buf;
3728 (void) snprintf(buf, sizeof (buf), "%s%llu", path,
3730 path = buf;
3742 (void) snprintf(buf, sizeof (buf), "%s-%llu", path,
3744 path = buf;
3906 * 'buf' is the buffer to fill up to 'len' bytes. 'off' is the
3910 * 'len' is the actual amount of bytes read into 'buf'.
3913 get_history(zpool_handle_t *zhp, char *buf, uint64_t *off, uint64_t *len)
3920 zc.zc_history = (uint64_t)(uintptr_t)buf;
3958 zpool_history_unpack(char *buf, uint64_t bytes_read, uint64_t *leftover,
3969 reclen += (uint64_t)(((uchar_t *)buf)[i]) << (8*i);
3975 if (nvlist_unpack(buf + sizeof (reclen), reclen, &nv, 0) != 0)
3978 buf += sizeof (reclen) + reclen;
4004 char *buf;
4011 buf = malloc(buflen);
4012 if (buf == NULL)
4019 if ((err = get_history(zhp, buf, off, &bytes_read)) != 0)
4028 if ((err = zpool_history_unpack(buf, bytes_read,
4038 free(buf);
4039 buf = NULL;
4041 ((buf = malloc(buflen)) == NULL)) {
4048 free(buf);
4291 char buf[64];
4292 zfs_nicenum(boot_size, buf, sizeof (buf));
4295 "small, the minimum size is 1MB."), buf);
4306 char buf[64];
4307 zfs_nicenum(boot_size, buf, sizeof (buf));
4311 "may result in unbootable system.\n"), buf);