Hello community, here is the log from the commit of package hwinfo for openSUSE:Factory checked in at 2016-07-20 09:16:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2016-06-13 21:49:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.hwinfo.new/hwinfo.changes 2016-07-20 09:16:59.000000000 +0200 @@ -1,0 +2,12 @@ +Thu Jul 14 09:04:26 UTC 2016 - [email protected] + +- refine last patch a bit (bsc#960507) +- 21.29 + +------------------------------------------------------------------- +Wed Jul 13 14:40:35 UTC 2016 - [email protected] + +- avoid bogus virtio devices in device listing (bsc#960507) +- 21.28 + +------------------------------------------------------------------- Old: ---- hwinfo-21.27.tar.xz New: ---- hwinfo-21.29.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hwinfo.spec ++++++ --- /var/tmp/diff_new_pack.d6ig8V/_old 2016-07-20 09:16:59.000000000 +0200 +++ /var/tmp/diff_new_pack.d6ig8V/_new 2016-07-20 09:16:59.000000000 +0200 @@ -36,7 +36,7 @@ Group: Hardware/Other # Until migration to github this should be correct url Url: http://gitorious.org/opensuse/hwinfo -Version: 21.27 +Version: 21.29 Release: 0 Source: %{name}-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ hwinfo-21.27.tar.xz -> hwinfo-21.29.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.27/VERSION new/hwinfo-21.29/VERSION --- old/hwinfo-21.27/VERSION 2016-06-08 12:40:59.000000000 +0200 +++ new/hwinfo-21.29/VERSION 2016-07-14 10:59:21.000000000 +0200 @@ -1 +1 @@ -21.27 +21.29 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.27/changelog new/hwinfo-21.29/changelog --- old/hwinfo-21.27/changelog 2016-06-08 12:40:59.000000000 +0200 +++ new/hwinfo-21.29/changelog 2016-07-14 10:59:21.000000000 +0200 @@ -1,3 +1,9 @@ +2016-07-14: 21.29 + - refine last patch a bit (bsc #960507) + +2016-07-13: 21.28 + - avoid bogus virtio devices in device listing (bsc #960507) + 2016-06-08: 21.27 - add aliases with '-' for options with '_' (bsc #983004) - clarify hwinfo usage in man page and help text (bsc #982332) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hwinfo-21.27/src/hd/pci.c new/hwinfo-21.29/src/hd/pci.c --- old/hwinfo-21.27/src/hd/pci.c 2016-06-08 12:40:59.000000000 +0200 +++ new/hwinfo-21.29/src/hd/pci.c 2016-07-14 10:59:21.000000000 +0200 @@ -1572,9 +1572,9 @@ int net_cnt = 0, blk_cnt = 0; unsigned dev; uint64_t ul0; - hd_t *hd; + hd_t *hd, *hd2; str_list_t *sf_bus, *sf_bus_e; - char *sf_dev, *drv, *drv_name, *modalias; + char *sf_dev, *drv, *drv_name, *modalias, *s, *t; sf_bus = read_dir("/sys/bus/virtio/devices", 'l'); @@ -1641,6 +1641,33 @@ str_printf(&hd->device.name, 0, "Storage %d", hd->slot); break; } + + /* + * virtio devs are kind of 'subdevices' to real pci devices; but + * the supposedly 'real' devices mess up our device list :-( + * + * here we track down the 'real' devices and disable them in any + * future device listing by classifying them right now as 'unknown' + * + * this works because devices will never be re-classified + */ + s = new_str(hd->sysfs_id); // get a writable copy + + if((t = strrchr(s, '/'))) { + *t = 0; // cut out last path element + if((hd2 = hd_find_sysfs_id(hd_data, s))) { + hd->attached_to = hd2->idx; + // hasn't been classified yet and has the same base class + if( + !hd2->hw_class && + hd->base_class.id == hd2->base_class.id + ) { + hd2->hw_class = hw_unknown; + } + } + } + + free_mem(s); } free_mem(modalias);
