Hello community,

here is the log from the commit of package hwinfo for openSUSE:Factory checked 
in at 2014-03-21 12:14:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    2013-11-28 
07:27:20.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.hwinfo.new/hwinfo.changes       2014-03-21 
12:14:21.000000000 +0100
@@ -1,0 +2,10 @@
+Mon Jan 27 19:32:58 UTC 2014 - [email protected]
+
+- Show Consistant Device Name (CDN) as Device Name.
+  The Device name of a PCI or PCI Express device under OS may be exported
+  by BIOS via label sysfs attribute. Read it and show it to the user as
+  "Device Name:"
+  fate#316031, fate#315201
+  Add: hwinfo_pci_scan_label.patch
+
+-------------------------------------------------------------------

New:
----
  hwinfo_pci_scan_label.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hwinfo.spec ++++++
--- /var/tmp/diff_new_pack.fLbJaC/_old  2014-03-21 12:14:23.000000000 +0100
+++ /var/tmp/diff_new_pack.fLbJaC/_new  2014-03-21 12:14:23.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package hwinfo
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 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
@@ -16,6 +16,7 @@
 #
 
 
+
 Name:           hwinfo
 BuildRequires:  doxygen
 BuildRequires:  flex
@@ -39,6 +40,7 @@
 Version:        21.0
 Release:        0
 Source:         hwinfo-21.0.tar.bz2
+Patch0:         hwinfo_pci_scan_label.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -73,6 +75,7 @@
 
 %prep
 %setup
+%patch0 -p1
 
 %build
   make static

++++++ hwinfo_pci_scan_label.patch ++++++
Index: hwinfo-21.0/src/hd/hd.h
===================================================================
--- hwinfo-21.0.orig/src/hd/hd.h
+++ hwinfo-21.0/src/hd/hd.h
@@ -1047,6 +1047,7 @@ typedef struct s_pci_t {
   char *sysfs_id;                              /**< sysfs path */
   char *sysfs_bus_id;                          /**< sysfs bus id */
   char *modalias;                              /**< module alias */
+  char *label;                                 /**< Consistant Device Name 
(CDN), pci firmware spec 3.1, chapter 4.6.7 */
   unsigned edid_len[4];                                /**< edid record length 
*/
   unsigned char edid_data[4][0x80];            /**< edid record */
 } pci_t;
@@ -2583,6 +2584,7 @@ typedef struct s_hd_t {
   hal_prop_t *persistent_prop; /**< persistent property list */
 
   char *modalias;              /**< module alias */
+  char *label;                 /**< Consistent Device Name (CDN), pci firmware 
spec 3.1, chapter 4.6.7 */
 
   /*
    * These are used internally for memory management.
Index: hwinfo-21.0/src/hd/pci.c
===================================================================
--- hwinfo-21.0.orig/src/hd/pci.c
+++ hwinfo-21.0/src/hd/pci.c
@@ -192,6 +192,11 @@ void hd_pci_read_data(hd_data_t *hd_data
       pci->irq = ul0;
     }
 
+    if((s = get_sysfs_attr_by_path(sf_dev, "label"))) {
+      pci->label = canon_str(s, strlen(s));
+      ADD2LOG("    label = \"%s\"\n", pci->label);
+    }
+
     sl = hd_attr_list(get_sysfs_attr_by_path(sf_dev, "resource"));
     for(u = 0; sl; sl = sl->next, u++) {
       if(
@@ -432,6 +437,11 @@ void hd_pci_complete_data(hd_t *hd)
     pci->modalias = NULL;
   }
 
+  if(pci->label && *pci->label) {
+    hd->label = pci->label;
+    pci->label = NULL;
+  }
+
   hd->slot = pci->slot + (pci->bus << 8);
   hd->func = pci->func;
   hd->base_class.id = pci->base_class;
Index: hwinfo-21.0/src/hd/hdp.c
===================================================================
--- hwinfo-21.0.orig/src/hd/hdp.c
+++ hwinfo-21.0/src/hd/hdp.c
@@ -357,6 +357,8 @@ void dump_normal(hd_data_t *hd_data, hd_
   hd_detail_monitor_t *mdetail;
   static char *geo_type_str[] = { "Physical", "Logical", "BIOS EDD", "BIOS 
Legacy" };
 
+  if(h->label) dump_line("Device Name: \"%s\"\n", h->label);
+
   if(h->model) dump_line("Model: \"%s\"\n", h->model);
 
   s = NULL;
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to