diff options
| author | Karel Zak <kzak@redhat.com> | 2024-07-29 10:21:28 +0200 |
|---|---|---|
| committer | Pratik R. Sampat <pratikrajesh.sampat@amd.com> | 2024-07-30 14:26:50 +0000 |
| commit | 5d1129e6879a05aa9ac5804ffc8ace22cda735c1 (patch) | |
| tree | 5d693ba84ccf67d974587f31c0158d9005a38bd4 /sys-utils/lscpu-arm.c | |
| parent | 50a3efab6d126b28fcdcc28f1a0cd5cd596ae357 (diff) | |
| download | util-linux-5d1129e6879a05aa9ac5804ffc8ace22cda735c1.tar.gz | |
lscpu: make code more readable
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/lscpu-arm.c')
| -rw-r--r-- | sys-utils/lscpu-arm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys-utils/lscpu-arm.c b/sys-utils/lscpu-arm.c index ad714e77ae..5966df0a61 100644 --- a/sys-utils/lscpu-arm.c +++ b/sys-utils/lscpu-arm.c @@ -449,13 +449,13 @@ static int arm_rXpY_decode(struct lscpu_cputype *ct) static void arm_decode(struct lscpu_cxt *cxt, struct lscpu_cputype *ct) { - if (!cxt->noalive && access(_PATH_SYS_DMI, R_OK) == 0) + if (is_live(cxt) && access(_PATH_SYS_DMI, R_OK) == 0) dmi_decode_cputype(ct); arm_ids_decode(ct); arm_rXpY_decode(ct); - if (!cxt->noalive && cxt->is_cluster) + if (is_live(cxt) && cxt->is_cluster) ct->nr_socket_on_cluster = get_number_of_physical_sockets_from_dmi(); } @@ -463,7 +463,7 @@ static int is_cluster_arm(struct lscpu_cxt *cxt) { struct stat st; - if (!cxt->noalive + if (is_live(cxt) && strcmp(cxt->arch->name, "aarch64") == 0 && stat(_PATH_ACPI_PPTT, &st) < 0 && cxt->ncputypes == 1) return 1; |
