1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-13 17:18:18 +03:00

dissect: don't show non-JSON arch + sector size in JSON mode

This commit is contained in:
Lennart Poettering 2023-10-10 16:05:28 +02:00
parent e8868e8354
commit 66cd3537f9

View File

@ -836,15 +836,15 @@ static int action_dissect(DissectedImage *m, LoopDevice *d) {
else if (arg_json_format_flags & JSON_FORMAT_OFF)
printf(" Size: %s\n", FORMAT_BYTES(size));
printf(" Sec. Size: %" PRIu32 "\n", m->sector_size);
if (arg_json_format_flags & JSON_FORMAT_OFF) {
printf(" Sec. Size: %" PRIu32 "\n", m->sector_size);
printf(" Arch.: %s\n",
strna(architecture_to_string(dissected_image_architecture(m))));
printf(" Arch.: %s\n",
strna(architecture_to_string(dissected_image_architecture(m))));
if (arg_json_format_flags & JSON_FORMAT_OFF)
putc('\n', stdout);
fflush(stdout);
fflush(stdout);
}
r = dissected_image_acquire_metadata(m, 0);
if (r == -ENXIO)