Hello community, here is the log from the commit of package hwinfo for openSUSE:Factory checked in at 2015-03-03 11:11:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hwinfo (Old) and /work/SRC/openSUSE:Factory/.hwinfo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hwinfo" Changes: -------- --- /work/SRC/openSUSE:Factory/hwinfo/hwinfo.changes 2015-01-09 20:52:15.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.hwinfo.new/hwinfo.changes 2015-03-03 11:11:18.000000000 +0100 @@ -1,0 +2,6 @@ +Fri Feb 27 10:31:12 CET 2015 - [email protected] + +- Update aarch64 cpuinfo parser to handle post-3.19 format +- 21.12 + +------------------------------------------------------------------- Old: ---- hwinfo-21.11.tar.xz New: ---- hwinfo-21.12.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hwinfo.spec ++++++ --- /var/tmp/diff_new_pack.VbJRfo/_old 2015-03-03 11:11:19.000000000 +0100 +++ /var/tmp/diff_new_pack.VbJRfo/_new 2015-03-03 11:11:19.000000000 +0100 @@ -36,7 +36,7 @@ Group: Hardware/Other # Until migration to github this should be correct url Url: http://gitorious.org/opensuse/hwinfo -Version: 21.11 +Version: 21.12 Release: 0 Source: %{name}-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ hwinfo-21.11.tar.xz -> hwinfo-21.12.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.11/VERSION new/hwinfo-21.12/VERSION --- old/hwinfo-21.11/VERSION 2015-01-07 10:51:30.000000000 +0100 +++ new/hwinfo-21.12/VERSION 2015-02-27 10:26:03.000000000 +0100 @@ -1 +1 @@ -21.11 +21.12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.11/changelog new/hwinfo-21.12/changelog --- old/hwinfo-21.11/changelog 2015-01-07 10:51:30.000000000 +0100 +++ new/hwinfo-21.12/changelog 2015-02-27 10:26:03.000000000 +0100 @@ -1,3 +1,6 @@ +2015-02-26: 21.12 + - Update aarch64 cpuinfo parser to handle post-3.19 format + 2015-01-06: 21.11 - Add PowerNV platform support diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.11/src/hd/cpu.c new/hwinfo-21.12/src/hd/cpu.c --- old/hwinfo-21.11/src/hd/cpu.c 2015-01-07 10:51:30.000000000 +0100 +++ new/hwinfo-21.12/src/hd/cpu.c 2015-02-27 10:26:03.000000000 +0100 @@ -121,6 +121,7 @@ unsigned u; double bogo; char *t0, *t; + int old_format; #endif #ifdef __PPC__ @@ -280,64 +281,68 @@ *model_id = *system_id = *serial_number = 0; cpu_variation = cpu_revision = 0; ct = 0; bogo = 0; + vendor_id = 0; hd_data->boot = boot_uboot; for(sl = hd_data->cpu; sl; sl = sl->next) { - if(sscanf(sl->str, "Processor : %79[^\n]", model_id) == 1) continue; - if(sscanf(sl->str, "Hardware : %79[^\n]", system_id) == 1) continue; - if(sscanf(sl->str, "Features : %1000[^\n]", features) == 1) continue; - if(sscanf(sl->str, "CPU variant : 0x%x", &cpu_variation) == 1) continue; - if(sscanf(sl->str, "CPU implementer : 0x%x", &vendor_id) == 1) continue; - if(sscanf(sl->str, "CPU revision : %d", &cpu_revision) == 1) continue; + if(sscanf(sl->str, "Processor : %79[^\n]", model_id) == 1); + if(sscanf(sl->str, "Hardware : %79[^\n]", system_id) == 1); + if(sscanf(sl->str, "Features : %1000[^\n]", features) == 1); + if(sscanf(sl->str, "CPU variant : 0x%x", &cpu_variation) == 1); + if(sscanf(sl->str, "CPU implementer : 0x%x", &vendor_id) == 1); + if(sscanf(sl->str, "CPU revision : %d", &cpu_revision) == 1); if(!bogo && sscanf(sl->str, "BogoMIPS : %lg", &bogo) == 1); - if(strstr(sl->str, "processor\t: ") == sl->str) cpus++; - } - - /* if we didn't find any cpus, we might be running under qemu. - So simulate just one CPU to make the rest happy. */ - if(!cpus) cpus = 1; - for(u = 0; u < cpus; u++) { - ct = new_mem(sizeof *ct); - ct->architecture = arch_aarch64; - ct->family = cpu_variation; - ct->model = cpu_revision; - ct->stepping = 0; - ct->cache = 0; - ct->clock = 0; - ct->bogo = bogo; - ct->platform = 0; - if(*system_id) ct->platform = new_str(system_id); - if(*model_id) ct->model_name = new_str(model_id); - - switch (vendor_id) { - case 0x41: ct->vend_name = new_str("ARM Limited"); break; - case 0x44: ct->vend_name = new_str("Digital Equipment Corporation"); break; - case 0x4d: ct->vend_name = new_str("Motorola, Freescale Semiconductor Inc."); break; - case 0x51: ct->vend_name = new_str("QUALCOMM Inc."); break; - case 0x56: ct->vend_name = new_str("Marvell Semiconductor Inc."); break; - case 0x69: ct->vend_name = new_str("Intel Corporation."); break; - default: - { - char buf[80]; - sprintf(buf, "unknown (%x)", vendor_id); - ct->vend_name = new_str(buf); - } - } - - if(*features) { - for(t0 = features; (t = strsep(&t0, " ")); ) { - add_str_list(&ct->features, t); + if(strstr(sl->str, "processor") == sl->str || !sl->next) { /* EOF */ + if (!vendor_id) { /* pre-3.19 format */ + cpus++; + continue; + } + if (*model_id || vendor_id) { /* at least one of those */ + loop: + ct = new_mem(sizeof *ct); + ct->architecture = arch_aarch64; + ct->family = cpu_variation; + ct->model = cpu_revision; + ct->stepping = 0; + ct->cache = 0; + ct->clock = 0; + ct->bogo = bogo; + ct->platform = 0; + if(*system_id) ct->platform = new_str(system_id); + if(*model_id) ct->model_name = new_str(model_id); + switch (vendor_id) { + case 0x41: ct->vend_name = new_str("ARM Limited"); break; + case 0x44: ct->vend_name = new_str("Digital Equipment Corporation"); break; + case 0x4d: ct->vend_name = new_str("Motorola, Freescale Semiconductor Inc."); break; + case 0x51: ct->vend_name = new_str("QUALCOMM Inc."); break; + case 0x56: ct->vend_name = new_str("Marvell Semiconductor Inc."); break; + case 0x69: ct->vend_name = new_str("Intel Corporation."); break; + default: + { + char buf[80]; + sprintf(buf, "unknown (%x)", vendor_id); + ct->vend_name = new_str(buf); + } + } + + if(*features) { + for(t0 = features; (t = strsep(&t0, " ")); ) { + add_str_list(&ct->features, t); + } + } + + hd = add_hd_entry(hd_data, __LINE__, 0); + hd->base_class.id = bc_internal; + hd->sub_class.id = sc_int_cpu; + hd->slot = u; + hd->detail = new_mem(sizeof *hd->detail); + hd->detail->type = hd_detail_cpu; + hd->detail->cpu.data = ct; + if (*model_id && --cpus) goto loop; /* pre-3.19 format */ + cpus++; } } - - hd = add_hd_entry(hd_data, __LINE__, 0); - hd->base_class.id = bc_internal; - hd->sub_class.id = sc_int_cpu; - hd->slot = u; - hd->detail = new_mem(sizeof *hd->detail); - hd->detail->type = hd_detail_cpu; - hd->detail->cpu.data = ct; } #endif /* __aarch64__ */ -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
