diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2017-11-30 16:31:24 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-12-01 00:54:47 -0600 |
commit | c35f784a9f63040c8bc044377c03bbae2079fe08 (patch) | |
tree | 4e1a73d54093de00081c0f93131aca12a03b60a0 /external | |
parent | 95a0f5d9db9897af212af66b6b87ccd09db26048 (diff) | |
download | skiboot-c35f784a9f63040c8bc044377c03bbae2079fe08.zip skiboot-c35f784a9f63040c8bc044377c03bbae2079fe08.tar.gz skiboot-c35f784a9f63040c8bc044377c03bbae2079fe08.tar.bz2 |
gard: Fix up path parsing
Currently we assume that the Unit ID can be used as an array index into
the chip_units[] structure. There are holes in the ID space though, so
this doesn't actually work. Fix it up by walking the array looking for
the ID.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/gard/gard.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/external/gard/gard.c b/external/gard/gard.c index c70fa2a..5a57415 100644 --- a/external/gard/gard.c +++ b/external/gard/gard.c @@ -325,7 +325,7 @@ int parse_path(const char *str, struct entity_path *parsed) parsed->path_elements[unit_count].target_type = unit_id; /* now parse the instance # */ - len = strlen(chip_units[unit_id].desc); + len = strlen(target_type_to_str(unit_id)); instance = strtol(str + len, &end, 10); if (!isdigit(*(str + len))) { |