diff options
author | oohal <oohal@users.noreply.github.com> | 2018-03-26 13:03:23 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-26 13:03:23 +1100 |
commit | 5d8a2bd5ca465cd76d0add40d4c824d32b4bd555 (patch) | |
tree | 118f926b622ad7c8d66b54c7e8b48f1c7e1e03ea | |
parent | 1090f346713ae43319cfeb3eb65ca24f9864b628 (diff) | |
parent | 4fcf4549d16801e23c64c591831aa255af9cf873 (diff) | |
download | skiboot-5d8a2bd5ca465cd76d0add40d4c824d32b4bd555.zip skiboot-5d8a2bd5ca465cd76d0add40d4c824d32b4bd555.tar.gz skiboot-5d8a2bd5ca465cd76d0add40d4c824d32b4bd555.tar.bz2 |
Merge pull request #161 from dcrowell77/gardtool
Make gard display show that a record is cleared
-rw-r--r-- | external/gard/gard.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/external/gard/gard.c b/external/gard/gard.c index 86fcbe8..04c3b74 100644 --- a/external/gard/gard.c +++ b/external/gard/gard.c @@ -488,11 +488,12 @@ static int do_list(struct gard_ctx *ctx, int argc, char **argv) draw_ruler('-', ruler_size); for_each_gard(ctx, pos, &gard, &rc) { - printf(" %08x | %08x | %-10s | %s\n", + printf(" %08x | %08x | %-10s | %s%s\n", be32toh(gard.record_id), be32toh(gard.errlog_eid), deconfig_reason_str(gard.error_type), - format_path(&gard.target_id, scratch)); + format_path(&gard.target_id, scratch), + gard.record_id == 0xffffffff ? " *CLEARED*" : ""); } draw_ruler('=', ruler_size); @@ -515,7 +516,7 @@ static int do_show_i(struct gard_ctx *ctx, int pos, struct gard_record *gard, vo if (be32toh(gard->record_id) == id) { unsigned int count, i; - printf("Record ID: 0x%08x\n", id); + printf("Record ID: 0x%08x%s\n", id, id == 0xffffffff ? " *CLEARED*" : ""); printf("========================\n"); printf("Error ID: 0x%08x\n", be32toh(gard->errlog_eid)); printf("Error Type: %s (0x%02x)\n", |