summaryrefslogtreecommitdiffstats
path: root/external/gard
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-11-08 19:59:09 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-11-20 20:35:24 -0600
commit1e038388f385eea2cbc0dae803442dc1fc140372 (patch)
tree57ce88a5d98b31adb8e7929c96b225fa6bc1ec16 /external/gard
parent5d4241ddaf441bc357b4219154d3af1ff7c95cc9 (diff)
downloadblackbird-skiboot-1e038388f385eea2cbc0dae803442dc1fc140372.tar.gz
blackbird-skiboot-1e038388f385eea2cbc0dae803442dc1fc140372.zip
gard: Replace is_valid_id with is_valid_record()
It was annoying me. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external/gard')
-rw-r--r--external/gard/gard.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/external/gard/gard.c b/external/gard/gard.c
index 9505293d..0c8ac47e 100644
--- a/external/gard/gard.c
+++ b/external/gard/gard.c
@@ -182,9 +182,9 @@ static const char *path_type_to_str(enum path_type t)
return "Unknown";
}
-static bool is_valid_id(uint32_t record_id)
+static bool is_valid_record(struct gard_record *g)
{
- return record_id != CLEARED_RECORD_ID;
+ return be32toh(g->record_id) != CLEARED_RECORD_ID;
}
static int do_iterate(struct gard_ctx *ctx,
@@ -246,7 +246,7 @@ static int count_valid_records_i(struct gard_ctx *ctx, int pos, struct gard_reco
if (!gard || !priv)
return -1;
- if (is_valid_id(be32toh(gard->record_id)))
+ if (is_valid_record(gard))
(*(int *)priv)++;
return 0;
@@ -272,7 +272,7 @@ static int do_list_i(struct gard_ctx *ctx, int pos, struct gard_record *gard, vo
if (!gard)
return -1;
- if (is_valid_id(be32toh(gard->record_id)))
+ if (is_valid_record(gard))
printf("| %08x | %08x | %-15s |\n", be32toh(gard->record_id), be32toh(gard->errlog_eid),
path_type_to_str(gard->target_id.type_size >> PATH_TYPE_SHIFT));
OpenPOWER on IntegriCloud