Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
util-linux.3352
util-linux-lscpu-power-3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File util-linux-lscpu-power-3.patch of Package util-linux.3352
From 86c4817e0ea02656ddb62fe27757a9fd4f13b2d3 Mon Sep 17 00:00:00 2001 From: Ruediger Meier <ruediger.meier@ga-group.nl> Date: Wed, 16 Mar 2016 13:18:17 +0100 Subject: [PATCH 3/4] Revert "lscpu: keep lscpu usable on snapshots" This reverts commit 641350fe822e7f1ac10873dad9a364bdeaba8083. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl> --- sys-utils/lscpu.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 8e62c64..423bc56 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -453,36 +453,25 @@ read_basicinfo(struct lscpu_desc *desc, struct lscpu_modifier *mod) char buf[BUFSIZ]; struct utsname utsbuf; size_t setsize; - int overwrite_model = 0; /* architecture */ if (uname(&utsbuf) == -1) err(EXIT_FAILURE, _("error: uname failed")); desc->arch = xstrdup(utsbuf.machine); - /* Use another records from cpuinfo for PPC, on snapshot follow - * standard behavior. - * - * TODO: use runtime detection to make model overwrite possible on - * snapshots too. - */ -#if defined(__powerpc__) || defined(__powerpc64__) - if (mod->system == SYSTEM_LIVE) - overwrite_model = 1; -#endif /* details */ while (fgets(buf, sizeof(buf), fp) != NULL) { if (lookup(buf, "vendor", &desc->vendor)) ; else if (lookup(buf, "vendor_id", &desc->vendor)) ; else if (lookup(buf, "family", &desc->family)) ; else if (lookup(buf, "cpu family", &desc->family)) ; - - else if (overwrite_model && lookup(buf, "revision", &desc->model)) ; - else if (overwrite_model && lookup(buf, "cpu", &desc->modelname)) ; - - else if (!overwrite_model && lookup(buf, "model", &desc->model)) ; - else if (!overwrite_model && lookup(buf, "model name", &desc->modelname)) ; - +#if defined(__powerpc__) || defined(__powerpc64__) + else if (lookup(buf, "revision", &desc->model)) ; + else if (lookup(buf, "cpu", &desc->modelname)) ; +#else + else if (lookup(buf, "model", &desc->model)) ; + else if (lookup(buf, "model name", &desc->modelname)) ; +#endif else if (lookup(buf, "stepping", &desc->stepping)) ; else if (lookup(buf, "cpu MHz", &desc->mhz)) ; else if (lookup(buf, "flags", &desc->flags)) ; /* x86 */ -- 2.8.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor