Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/cmd/zpool/zpool_main.c
Context not available. | |||||
if (strcmp(propval, ZFS_FEATURE_DISABLED) == 0) | if (strcmp(propval, ZFS_FEATURE_DISABLED) == 0) | ||||
(void) nvlist_remove_all(props, | (void) nvlist_remove_all(props, | ||||
propname); | propname); | ||||
} else if (enable_all_pool_feat) { | } else if (enable_all_pool_feat && | ||||
feat->fi_zfs_mod_supported) { | |||||
ret = add_prop_list(propname, | ret = add_prop_list(propname, | ||||
ZFS_FEATURE_ENABLED, &props, B_TRUE); | ZFS_FEATURE_ENABLED, &props, B_TRUE); | ||||
if (ret != 0) | if (ret != 0) | ||||
Context not available. | |||||
* Mark empty values with dashes to make output | * Mark empty values with dashes to make output | ||||
* awk-able. | * awk-able. | ||||
*/ | */ | ||||
if (is_blank_str(val)) | if (val == NULL || is_blank_str(val)) | ||||
val = "-"; | val = "-"; | ||||
printf("%*s", vcdl->uniq_cols_width[j], val); | printf("%*s", vcdl->uniq_cols_width[j], val); | ||||
Context not available. | |||||
&records, &numrecords) == 0); | &records, &numrecords) == 0); | ||||
for (i = 0; i < numrecords; i++) { | for (i = 0; i < numrecords; i++) { | ||||
nvlist_t *rec = records[i]; | nvlist_t *rec = records[i]; | ||||
char tbuf[30] = ""; | char tbuf[64] = ""; | ||||
if (nvlist_exists(rec, ZPOOL_HIST_TIME)) { | if (nvlist_exists(rec, ZPOOL_HIST_TIME)) { | ||||
time_t tsec; | time_t tsec; | ||||
Context not available. | |||||
(void) strftime(tbuf, sizeof (tbuf), "%F.%T", &t); | (void) strftime(tbuf, sizeof (tbuf), "%F.%T", &t); | ||||
} | } | ||||
if (nvlist_exists(rec, ZPOOL_HIST_ELAPSED_NS)) { | |||||
uint64_t elapsed_ns = fnvlist_lookup_int64(records[i], | |||||
ZPOOL_HIST_ELAPSED_NS); | |||||
(void) snprintf(tbuf + strlen(tbuf), | |||||
sizeof (tbuf) - strlen(tbuf), | |||||
" (%lldms)", (long long)elapsed_ns / 1000 / 1000); | |||||
} | |||||
if (nvlist_exists(rec, ZPOOL_HIST_CMD)) { | if (nvlist_exists(rec, ZPOOL_HIST_CMD)) { | ||||
(void) printf("%s %s", tbuf, | (void) printf("%s %s", tbuf, | ||||
fnvlist_lookup_string(rec, ZPOOL_HIST_CMD)); | fnvlist_lookup_string(rec, ZPOOL_HIST_CMD)); | ||||
Context not available. |