]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: use the first VM from /proc/sysinfo
authorKarel Zak <kzak@redhat.com>
Tue, 4 Sep 2018 12:30:37 +0000 (14:30 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 4 Sep 2018 12:30:37 +0000 (14:30 +0200)
Addresses: https://github.com/karelzak/util-linux/issues/685
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lscpu.c

index 57f097dae8f9579934fef4be8b557da28b9ec48a..1ff9069f34d670262106cb2594640d32d03f7a59 100644 (file)
@@ -859,6 +859,7 @@ read_hypervisor(struct lscpu_desc *desc, struct lscpu_modifier *mod)
                                *(str--) = '\0';
                        while ((str = strstr(desc->hypervisor, "  ")))
                                memmove(str, str + 1, strlen(str));
+                       break;
                }
                fclose(fd);
        }