mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-03 10:25:16 +00:00
hyperv: fix nodeGetInfo failures caused by long CPU names
Some CPU model names were too long for _virNodeInfo.model. For example: Intel Xeon CPU E5-2620 v2 @ 2.10GHz This commit removes the clock frequency suffix. Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
c1cfbaab25
commit
2a59362feb
@ -285,6 +285,10 @@ hypervNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info)
|
||||
} else if (STRPREFIX(tmp, "(TM)")) {
|
||||
memmove(tmp, tmp + 4, strlen(tmp + 4) + 1);
|
||||
continue;
|
||||
} else if (STRPREFIX(tmp, " @ ")) {
|
||||
/* Remove " @ X.YZGHz" from the end. */
|
||||
*tmp = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
++tmp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user