break;
for (i = 0; i < zi->nr_zones; i++) {
-/*
- * blk_zone_report hasn't been packed since https://github.com/torvalds/linux/commit/b3e7e7d2d668de0102264302a4d10dd9d4438a42
- * was merged. See https://github.com/util-linux/util-linux/issues/1083
- */
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
- const struct blk_zone *entry = &zi->zones[i];
-#pragma GCC diagnostic pop
- unsigned int type = entry->type;
- uint64_t start = entry->start;
- uint64_t wp = entry->wp;
- uint8_t cond = entry->cond;
- uint64_t len = entry->len;
+ const struct blk_zone entry = zi->zones[i];
+ unsigned int type = entry.type;
+ uint64_t start = entry.start;
+ uint64_t wp = entry.wp;
+ uint8_t cond = entry.cond;
+ uint64_t len = entry.len;
uint64_t cap;
if (!len) {
}
if (has_zone_capacity(zi))
- cap = zone_capacity(entry);
+ cap = zone_capacity(&entry);
else
- cap = entry->len;
+ cap = entry.len;
if (only_capacity_sum) {
capacity_sum += cap;
", cap 0x%06"PRIx64", wptr 0x%06"PRIx64
" reset:%u non-seq:%u, zcond:%2u(%s) [type: %u(%s)]\n"),
start, len, cap, (type == 0x1) ? 0 : wp - start,
- entry->reset, entry->non_seq,
+ entry.reset, entry.non_seq,
cond, condition_str[cond & (ARRAY_SIZE(condition_str) - 1)],
type, type_text[type]);
} else {
", wptr 0x%06"PRIx64
" reset:%u non-seq:%u, zcond:%2u(%s) [type: %u(%s)]\n"),
start, len, (type == 0x1) ? 0 : wp - start,
- entry->reset, entry->non_seq,
+ entry.reset, entry.non_seq,
cond, condition_str[cond & (ARRAY_SIZE(condition_str) - 1)],
type, type_text[type]);
}