[Skiboot] [PATCH 4/8] gard: Fix max instance count

Oliver O'Halloran oohall at gmail.com
Thu Nov 30 16:31:25 AEDT 2017


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 at gmail.com>
---
 external/gard/gard.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/external/gard/gard.c b/external/gard/gard.c
index 5a57415ab5a7..d7a0876bbf31 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;
 		}
-- 
2.9.5



More information about the Skiboot mailing list