diff options
| -rw-r--r-- | usr.sbin/zonectl/zonectl.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/usr.sbin/zonectl/zonectl.c b/usr.sbin/zonectl/zonectl.c index 53e5e6599597..9dc6ddfd1aae 100644 --- a/usr.sbin/zonectl/zonectl.c +++ b/usr.sbin/zonectl/zonectl.c @@ -288,11 +288,22 @@ zonectl_print_rz(struct disk_zone_report *report, zone_output_flags out_flags, for (i = 0; i < report->entries_filled; i++) { entry = &report->entries[i]; - printf("%#*jx, %*ju, %#*jx, ", field_widths[ZONE_FW_START], + printf("%#*jx, %*ju, ", field_widths[ZONE_FW_START], (uintmax_t)entry->zone_start_lba, field_widths[ZONE_FW_LEN], - (uintmax_t)entry->zone_length, field_widths[ZONE_FW_WP], - (uintmax_t)entry->write_pointer_lba); + (uintmax_t)entry->zone_length); + if (entry->write_pointer_lba == 0xffffffffffffffff) { + /* + * This value is reported by HDDs for conventional + * zones. It really means "N/A". Reported it as -1, + * even though it's technically unsigned, to save + * space. + */ + printf("%*d, ", field_widths[ZONE_FW_WP], -1); + } else { + printf("%#*jx, ", field_widths[ZONE_FW_WP], + (uintmax_t)entry->write_pointer_lba); + } switch (entry->zone_type) { case DISK_ZONE_TYPE_CONVENTIONAL: |
