Hello community, here is the log from the commit of package hwinfo for openSUSE:Factory checked in at 2012-02-15 16:15:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hwinfo (Old) and /work/SRC/openSUSE:Factory/.hwinfo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hwinfo", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/hwinfo/hwinfo.changes 2011-10-08 11:42:27.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.hwinfo.new/hwinfo.changes 2012-02-15 16:16:08.000000000 +0100 @@ -1,0 +2,11 @@ +Fri Feb 10 09:49:44 CET 2012 - [email protected] + +- basic arm support +- updated git related scripts +- Use new and correct sysfs driver names: +- hv_storvsc instead of storvsc +- hv_netvsc instead of netvsc +- Remove blkvsc, the driver was merged into hv_storvsc +- detect fcoe disks (bnc #725134) + +------------------------------------------------------------------- Old: ---- hwinfo-19.0.tar.bz2 New: ---- hwinfo-19.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hwinfo.spec ++++++ --- /var/tmp/diff_new_pack.U8phcZ/_old 2012-02-15 16:16:09.000000000 +0100 +++ /var/tmp/diff_new_pack.U8phcZ/_new 2012-02-15 16:16:09.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package hwinfo # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,9 +33,9 @@ PreReq: /sbin/ldconfig AutoReqProv: on Summary: Hardware Library -Version: 19.0 +Version: 19.1 Release: 1 -Source: hwinfo-19.0.tar.bz2 +Source: hwinfo-19.1.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description ++++++ hwinfo-19.0.tar.bz2 -> hwinfo-19.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/Makefile new/hwinfo-19.1/Makefile --- old/hwinfo-19.0/Makefile 2011-10-07 15:13:02.000000000 +0200 +++ new/hwinfo-19.1/Makefile 2012-02-09 11:45:41.000000000 +0100 @@ -12,7 +12,10 @@ export SO_LIBS -GIT2LOG = $(shell [ -x ./git2log ] && echo ./git2log ) +GIT2LOG := $(shell if [ -x ./git2log ] ; then echo ./git2log --update ; else echo true ; fi) +GITDEPS := $(shell [ -d .git ] && echo .git/HEAD .git/refs/heads .git/refs/tags) + +VERSION := $(shell $(GIT2LOG) --version VERSION ; cat VERSION) include Makefile.common @@ -29,13 +32,8 @@ .PHONY: fullstatic static shared tiny doc diet tinydiet uc tinyuc -ifneq ($(GIT2LOG),) -changelog: .git/HEAD .git/refs/heads .git/refs/tags - $(GIT2LOG) --log >changelog - -VERSION: .git/HEAD .git/refs/heads .git/refs/tags - $(GIT2LOG) --version >VERSION -endif +changelog: $(GITDEPS) + $(GIT2LOG) --changelog changelog hwscan: hwscan.o $(LIBHD) $(CC) hwscan.o $(LDFLAGS) $(LIBS) -o $@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/VERSION new/hwinfo-19.1/VERSION --- old/hwinfo-19.0/VERSION 2011-10-07 15:13:09.000000000 +0200 +++ new/hwinfo-19.1/VERSION 2012-02-10 09:49:41.000000000 +0100 @@ -1 +1 @@ -19.0 +19.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/changelog new/hwinfo-19.1/changelog --- old/hwinfo-19.0/changelog 2011-10-07 15:13:11.000000000 +0200 +++ new/hwinfo-19.1/changelog 2012-02-10 09:49:42.000000000 +0100 @@ -1,3 +1,12 @@ +2012-02-09: HEAD + - basic arm support + - updated git related scripts + - Use new and correct sysfs driver names: + - hv_storvsc instead of storvsc + - hv_netvsc instead of netvsc + - Remove blkvsc, the driver was merged into hv_storvsc + - detect fcoe disks (bnc #725134) + 2011-10-07: 19.0 - new new version - new version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/hwinfo.c new/hwinfo-19.1/hwinfo.c --- old/hwinfo-19.0/hwinfo.c 2011-10-07 15:13:02.000000000 +0200 +++ new/hwinfo-19.1/hwinfo.c 2012-02-09 11:56:53.000000000 +0100 @@ -653,6 +653,9 @@ case boot_grub: t = "grub"; break; + case boot_uboot: + t = "uboot"; + break; } fprintf(f ? f : stdout, "Arch: %s/%s\n", s, t); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/src/hd/block.c new/hwinfo-19.1/src/hd/block.c --- old/hwinfo-19.0/src/hd/block.c 2011-10-07 15:13:02.000000000 +0200 +++ new/hwinfo-19.1/src/hd/block.c 2012-02-09 11:37:10.000000000 +0100 @@ -827,6 +827,7 @@ res->fc.wwpn_ok = 1; res->fc.port_id = u0; res->fc.port_id_ok = 1; + if(hd->sysfs_device_link && strstr(hd->sysfs_device_link, "/net/")) hd->is.fcoe = 1; } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/src/hd/cpu.c new/hwinfo-19.1/src/hd/cpu.c --- old/hwinfo-19.0/src/hd/cpu.c 2011-07-19 11:37:33.000000000 +0200 +++ new/hwinfo-19.1/src/hd/cpu.c 2012-02-09 11:56:53.000000000 +0100 @@ -107,6 +107,14 @@ cpu_info_t *ct1; #endif +#ifdef __arm__ + char model_id[80], system_id[80], serial_number[80], features[0x400]; + unsigned cpu_variation, cpu_revision, vendor_id; + unsigned u; + double bogo; + char *t0, *t; +#endif + #ifdef __PPC__ char model_id[80], vendor_id[80], motherboard[80]; unsigned mhz, cache, family, model, stepping; @@ -189,6 +197,71 @@ } #endif /* __alpha__ */ +#ifdef __arm__ + *model_id = *system_id = *serial_number = 0; + cpu_variation = cpu_revision = 0; + ct = 0; bogo = 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(!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_arm; + 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, new_str(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; + } +#endif /* __arm__ */ + #ifdef __sparc__ *cpu_id = *fpu_id = *promlib = *prom = *type = *mmu = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/src/hd/edd.c new/hwinfo-19.1/src/hd/edd.c --- old/hwinfo-19.0/src/hd/edd.c 2011-07-19 11:37:33.000000000 +0200 +++ new/hwinfo-19.1/src/hd/edd.c 2012-02-09 11:37:10.000000000 +0100 @@ -3,6 +3,7 @@ #include <string.h> #include <unistd.h> #include <fcntl.h> +#include <endian.h> #include <sys/stat.h> #include <sys/types.h> @@ -52,11 +53,13 @@ void read_edd_info(hd_data_t *hd_data) { - unsigned u; - uint64_t ul0; + unsigned u, u1; + uint64_t ul0, edd_dev_path1, edd_dev_path2; edd_info_t *ei; - str_list_t *sl, *sf_dir, *sf_dir_e; - char *sf_edd = NULL; + str_list_t *sl, *sf_dir, *sf_dir_e, *sf_dir2; + char *sf_edd = NULL, *net_link = NULL; + unsigned char *edd_raw; + char *edd_bus, *edd_interface, *edd_link; for(u = 0; u < sizeof hd_data->edd / sizeof *hd_data->edd; u++) { free_mem(hd_data->edd[u].sysfs_id); @@ -122,8 +125,32 @@ if(search_str_list(sl, "Enhanced Disk Drive support")) hd_data->edd[u].ext_edd = 1; if(search_str_list(sl, "64-bit extensions")) hd_data->edd[u].ext_64bit = 1; + edd_bus = edd_interface = NULL; + edd_dev_path1 = edd_dev_path2 = 0; + + edd_raw = get_sysfs_attr_by_path2(sf_edd, "raw_data", &u1); + if(u1 >= 40) edd_bus = canon_str(edd_raw + 36, 4); + if(u1 >= 48) { + edd_interface = canon_str(edd_raw + 40, 8); + if(!strcmp(edd_interface, "FIBRE")) ei->ext_fibre = 1; + } + if(u1 >= 72) { + memcpy(&edd_dev_path1, edd_raw + 56, 8); + memcpy(&edd_dev_path2, edd_raw + 64, 8); + + edd_dev_path1 = be64toh(edd_dev_path1); // wwid for fc + } + + edd_link = hd_read_sysfs_link(sf_edd, "pci_dev"); + if(edd_link) { + str_printf(&net_link, 0, "%s/net", edd_link); + sf_dir2 = read_dir("/sys/firmware/edd", 'D'); + if(sf_dir2) ei->ext_net = 1; + free_str_list(sf_dir2); + } + ADD2LOG( - "edd: 0x%02x\n mbr sig: 0x%08x\n size: %"PRIu64"\n chs default: %u/%u/%u\n chs legacy: %u/%u/%u\n caps: %s%s%s%s\n", + "edd: 0x%02x\n mbr sig: 0x%08x\n size: %"PRIu64"\n chs default: %u/%u/%u\n chs legacy: %u/%u/%u\n caps: %s%s%s%s%s%s\n", u + 0x80, ei->signature, ei->sectors, @@ -136,12 +163,19 @@ ei->ext_fixed_disk ? "fixed " : "", ei->ext_lock_eject ? "lock " : "", ei->ext_edd ? "edd " : "", - ei->ext_64bit ? "64bit " : "" + ei->ext_64bit ? "64bit " : "", + ei->ext_fibre ? "fibre " : "", + ei->ext_net ? "net " : "" ); + ADD2LOG(" bus: %s\n interface: %s\n dev path: %016"PRIx64" %016"PRIx64"\n", edd_bus, edd_interface, edd_dev_path1, edd_dev_path2); + + free_mem(edd_bus); + free_mem(edd_interface); } } free_mem(sf_edd); + free_mem(net_link); free_str_list(sf_dir); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/src/hd/hd.c new/hwinfo-19.1/src/hd/hd.c --- old/hwinfo-19.0/src/hd/hd.c 2011-10-07 15:13:02.000000000 +0200 +++ new/hwinfo-19.1/src/hd/hd.c 2012-02-09 11:56:53.000000000 +0100 @@ -1797,7 +1797,7 @@ if(!hd_data->flags.internal) { /* log debug & probe flags */ if(hd_data->debug) { - ADD2LOG("libhd version %s%s (%s)\n", HD_VERSION_STRING, getuid() ? "u" : "", HD_ARCH); + ADD2LOG("libhd version %s%s (%s) [%ld]\n", HD_VERSION_STRING, getuid() ? "u" : "", HD_ARCH, sizeof (hd_data_t)); } ADD2LOG("using %s\n", hd_get_hddb_dir()); @@ -3053,6 +3053,9 @@ #ifdef __x86_64__ return arch_x86_64; #else +#ifdef __arm__ + return arch_arm; +#else return arch_unknown; #endif #endif @@ -3062,6 +3065,7 @@ #endif #endif #endif +#endif } @@ -6017,17 +6021,29 @@ /* * must be able to read more than one line */ -char *get_sysfs_attr_by_path(const char* path, const char* attr) +char *get_sysfs_attr_by_path(const char *path, const char *attr) +{ + return get_sysfs_attr_by_path2(path, attr, NULL); +} + + +/* + * binary data version; return data length, too + */ +char *get_sysfs_attr_by_path2(const char *path, const char *attr, unsigned *len) { static char buf[1024]; int i, fd; + if(len) *len = 0; + sprintf(buf, "%s/%s", path, attr); fd = open(buf, O_RDONLY); if(fd >= 0) { i = read(fd, buf, sizeof buf - 1); close(fd); if(i >= 0) { + if(len) *len = i; buf[i] = 0; } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/src/hd/hd.h new/hwinfo-19.1/src/hd/hd.h --- old/hwinfo-19.0/src/hd/hd.h 2011-10-07 15:13:02.000000000 +0200 +++ new/hwinfo-19.1/src/hd/hd.h 2012-02-09 11:59:21.000000000 +0100 @@ -1446,7 +1446,7 @@ typedef enum boot_arch { boot_unknown = 0, boot_lilo, boot_milo, boot_aboot, boot_silo, boot_ppc, boot_elilo, boot_s390, - boot_mips, boot_grub + boot_mips, boot_grub, boot_uboot, } hd_boot_arch_t; @@ -1492,6 +1492,8 @@ unsigned ext_64bit:1; unsigned assigned:1; unsigned valid:1; + unsigned ext_fibre:1; + unsigned ext_net:1; char *sysfs_id; unsigned hd_idx; unsigned signature; @@ -2491,6 +2493,7 @@ unsigned with_acpi:1; /**< acpi works fine */ unsigned hotpluggable:1; /**< hotpluggable storage device */ unsigned dualport:1; /**< OSA Express device with two ports (S/390) */ + unsigned fcoe:1; /**< fcoe device */ } is; struct tag_s { /**< this struct is for internal purposes only */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/src/hd/hd_int.h new/hwinfo-19.1/src/hd/hd_int.h --- old/hwinfo-19.0/src/hd/hd_int.h 2011-10-07 15:13:02.000000000 +0200 +++ new/hwinfo-19.1/src/hd/hd_int.h 2012-02-09 11:37:10.000000000 +0100 @@ -200,7 +200,8 @@ str_list_t *hd_module_list(hd_data_t *hd_data, unsigned id); char* get_sysfs_attr(const char* bus, const char* device, const char* attr); -char* get_sysfs_attr_by_path(const char* path, const char* attr); +char *get_sysfs_attr_by_path(const char *path, const char *attr); +char *get_sysfs_attr_by_path2(const char *path, const char *attr, unsigned *len); void hd_pci_complete_data(hd_t *hd); void hd_pci_read_data(hd_data_t *hd_data); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/src/hd/hdp.c new/hwinfo-19.1/src/hd/hdp.c --- old/hwinfo-19.0/src/hd/hdp.c 2011-10-07 15:13:02.000000000 +0200 +++ new/hwinfo-19.1/src/hd/hdp.c 2012-02-09 11:37:10.000000000 +0100 @@ -512,7 +512,7 @@ h->is.zip || h->is.cdr || h->is.cdrw || h->is.dvd || h->is.dvdr || h->is.dvdrw || h->is.dvdpr || h->is.dvdprw || h->is.dvdprdl || h->is.dvdram || - h->is.pppoe || h->is.wlan || h->is.hotpluggable + h->is.pppoe || h->is.wlan || h->is.hotpluggable || h->is.fcoe ) { dump_line_str("Features:"); i = 0; @@ -539,6 +539,7 @@ if(h->is.mrww) dump_line0("%s MRW-W", i++ ? "," : ""); if(h->is.pppoe) dump_line0("%s PPPOE", i++ ? "," : ""); if(h->is.wlan) dump_line0("%s WLAN", i++ ? "," : ""); + if(h->is.fcoe) dump_line0("%s FCoE", i++ ? "," : ""); if(h->is.hotpluggable) dump_line0("%s Hotpluggable", i++ ? "," : ""); dump_line0("\n"); } @@ -834,13 +835,13 @@ " Horizontal: %4u %4u %4u %4u (+%u +%u +%u) %chsync\n", mi->hdisp, mi->hsyncstart, mi->hsyncend, mi->htotal, mi->hsyncstart - mi->hdisp, mi->hsyncend - mi->hdisp, mi->htotal - mi->hdisp, - mi->hflag + mi->hflag ?: ' ' ); dump_line( " Vertical: %4u %4u %4u %4u (+%u +%u +%u) %cvsync\n", mi->vdisp, mi->vsyncstart, mi->vsyncend, mi->vtotal, mi->vsyncstart - mi->vdisp, mi->vsyncend - mi->vdisp, mi->vtotal - mi->vdisp, - mi->vflag + mi->vflag ?: ' ' ); dump_line( " Frequencies: %.2f MHz, %.2f kHz, %.2f Hz\n", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/src/hd/pci.c new/hwinfo-19.1/src/hd/pci.c --- old/hwinfo-19.0/src/hd/pci.c 2011-10-07 15:13:02.000000000 +0200 +++ new/hwinfo-19.1/src/hd/pci.c 2012-02-09 11:37:10.000000000 +0100 @@ -1398,7 +1398,7 @@ if( drv_name && - !strcmp(drv_name, "netvsc") + !strcmp(drv_name, "hv_netvsc") ) { hd = add_hd_entry(hd_data, __LINE__, 0); hd->bus.id = bus_none; @@ -1417,7 +1417,7 @@ } else if( drv_name && - (!strcmp(drv_name, "storvsc") || !strcmp(drv_name, "blkvsc")) + !strcmp(drv_name, "hv_storvsc") ) { hd = add_hd_entry(hd_data, __LINE__, 0); hd->bus.id = bus_none; @@ -1427,7 +1427,7 @@ hd->base_class.id = bc_storage; hd->sub_class.id = sc_sto_other; hd->slot = blk_cnt++; - hd->device.id = MAKE_ID(TAG_SPECIAL, strcmp(drv_name, "storvsc") ? 3 : 2); + hd->device.id = MAKE_ID(TAG_SPECIAL, 2); str_printf(&hd->device.name, 0, "Storage %d", hd->slot); hd->sysfs_id = new_str(hd_sysfs_id(sf_dev)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-19.0/src/ids/src/special new/hwinfo-19.1/src/ids/src/special --- old/hwinfo-19.0/src/ids/src/special 2011-10-07 15:13:02.000000000 +0200 +++ new/hwinfo-19.1/src/ids/src/special 2012-02-09 11:37:10.000000000 +0100 @@ -663,15 +663,11 @@ vendor.id special 0x6013 &device.id special 0x0001 -+driver.module.modprobe netvsc ++driver.module.modprobe hv_netvsc vendor.id special 0x6013 &device.id special 0x0002 -+driver.module.modprobe storvsc - - vendor.id special 0x6013 -&device.id special 0x0003 -+driver.module.modprobe blkvsc ++driver.module.modprobe hv_storvsc # virtio vendor.id special 0x6014 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
