summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-11-30 16:31:25 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-12-01 00:54:47 -0600
commit90d8e71b83a8eac13bb6fe6a7db62085e65460f3 (patch)
tree8cb9c63dc3de65da69695033f42c9411ad503a0c
parentc35f784a9f63040c8bc044377c03bbae2079fe08 (diff)
downloadtalos-skiboot-90d8e71b83a8eac13bb6fe6a7db62085e65460f3.tar.gz
talos-skiboot-90d8e71b83a8eac13bb6fe6a7db62085e65460f3.zip
gard: Fix max instance count
There's an entire byte for the instance count rather than a nibble. Only barf if the instance number is beyond 255 rather than 16. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--external/gard/gard.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/external/gard/gard.c b/external/gard/gard.c
index 5a57415a..d7a0876b 100644
--- a/external/gard/gard.c
+++ b/external/gard/gard.c
@@ -340,9 +340,9 @@ int parse_path(const char *str, struct entity_path *parsed)
return -1;
}
- if (instance > 15 || instance < 0) {
+ if (instance > 255 || instance < 0) {
fprintf(stderr,
- "Instance %ld is invalid. Must be 0 to 15\n",
+ "Instance %ld is invalid. Must be 0 to 255\n",
instance);
return -1;
}
OpenPOWER on IntegriCloud