Fix switch guid parsing used in lidbalance and switchbalance commands,
use strtoull() instead of strtoul() which truncates 64-bit GUID value
on 32-bit machines.
Signed-off-by: Sasha Khapyorsky <[EMAIL PROTECTED]>
---
opensm/opensm/osm_console.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/opensm/opensm/osm_console.c b/opensm/opensm/osm_console.c
index 6db7aa6..59b2ed9 100644
--- a/opensm/opensm/osm_console.c
+++ b/opensm/opensm/osm_console.c
@@ -828,7 +828,7 @@ static void switchbalance_parse(char **p_last, osm_opensm_t
* p_osm, FILE * out)
}
if (p_cmd) {
- guid = strtoul(p_cmd, &p_end, 0);
+ guid = strtoull(p_cmd, &p_end, 0);
if (!guid || *p_end != '\0') {
fprintf(out, "Invalid guid specified\n");
help_switchbalance(out, 1);
@@ -1031,7 +1031,7 @@ static void lidbalance_parse(char **p_last, osm_opensm_t
* p_osm, FILE * out)
if (p_cmd) {
char *p_end;
- switchguid = strtoul(p_cmd, &p_end, 0);
+ switchguid = strtoull(p_cmd, &p_end, 0);
if (!switchguid || *p_end != '\0') {
fprintf(out, "Invalid switchguid specified\n");
help_lidbalance(out, 1);
--
1.5.5.1.178.g1f811
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general