Hello community,

here is the log from the commit of package hwinfo for openSUSE:Factory checked 
in at 2014-11-26 10:32:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    2014-11-10 
17:28:00.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.hwinfo.new/hwinfo.changes       2014-11-26 
10:32:45.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Nov 24 15:10:26 CET 2014 - [email protected]
+
+- add arm platform devices
+- 21.9
+
+-------------------------------------------------------------------

Old:
----
  hwinfo-21.8.tar.xz

New:
----
  hwinfo-21.9.tar.xz

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

Other differences:
------------------
++++++ hwinfo.spec ++++++
--- /var/tmp/diff_new_pack.ASUu5o/_old  2014-11-26 10:32:46.000000000 +0100
+++ /var/tmp/diff_new_pack.ASUu5o/_new  2014-11-26 10:32:46.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.8
+Version:        21.9
 Release:        0
 Source:         %{name}-%{version}.tar.xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ hwinfo-21.8.tar.xz -> hwinfo-21.9.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.8/VERSION new/hwinfo-21.9/VERSION
--- old/hwinfo-21.8/VERSION     2014-11-07 08:20:34.000000000 +0100
+++ new/hwinfo-21.9/VERSION     2014-11-24 15:01:48.000000000 +0100
@@ -1 +1 @@
-21.8
+21.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.8/changelog new/hwinfo-21.9/changelog
--- old/hwinfo-21.8/changelog   2014-11-07 08:20:34.000000000 +0100
+++ new/hwinfo-21.9/changelog   2014-11-24 15:01:48.000000000 +0100
@@ -1,3 +1,6 @@
+2014-11-24:    21.9
+       - add arm platform devices
+
 2014-11-07:    21.8
        - fix bashisms in getsysinfo script
        - mark gen-hwcfg-disk.sh as shell, no bash script
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.8/src/hd/pci.c new/hwinfo-21.9/src/hd/pci.c
--- old/hwinfo-21.8/src/hd/pci.c        2014-11-07 08:20:34.000000000 +0100
+++ new/hwinfo-21.9/src/hd/pci.c        2014-11-24 15:01:48.000000000 +0100
@@ -878,10 +878,12 @@
  */
 void hd_read_platform(hd_data_t *hd_data)
 {
-  char *s, *platform_type;
+  char *s, *platform_type, *device_type = NULL;
   str_list_t *sf_bus, *sf_bus_e, *sf_eth_dev = NULL;
   char *sf_dev, *sf_eth_net;
   int mv643xx_eth_seen = 0;
+  int is_net, is_storage, is_usb;
+  hd_t *hd;
 
   sf_bus = read_dir("/sys/bus/platform/devices", 'l');
 
@@ -901,21 +903,70 @@
 
     if((s = get_sysfs_attr_by_path(sf_dev, "modalias"))) {
       platform_type = canon_str(s, strlen(s));
-      ADD2LOG("    type = \"%s\"\n", platform_type);
+      device_type = free_mem(device_type);
+      if((s = get_sysfs_attr_by_path(sf_dev, "uevent"))) {
+        char *t, *t2;
+        if((t = strstr(s, "OF_NAME="))) {
+          t += sizeof "OF_NAME=" - 1;
+          if((t2 = strchr(t, '\n'))) *t2 = 0;
+          device_type = strdup(t);
+        }
+      }
+      ADD2LOG("    type = \"%s\", modalias = \"%s\"\n", device_type, 
platform_type);
+      is_net = 0;
       sf_eth_net = new_str(hd_read_sysfs_link(sf_dev, "net"));
       sf_eth_dev = read_dir(sf_eth_net, 'd');
-      ADD2LOG("  platform device: sf_eth_net = %s sf_eth_dev = %p\n", 
sf_eth_net, sf_eth_dev);
-      if (
+      is_net = sf_eth_net && sf_eth_dev;
+      is_storage = device_type && !strcmp(device_type, "sata");
+      is_usb = device_type && !strcmp(device_type, "usb");
+      if(is_net) ADD2LOG("    is net: sf_eth_net = %s\n", sf_eth_net);
+      if(is_storage) ADD2LOG("    is storage\n");
+      if(is_usb) ADD2LOG("    is usb\n");
+      free_mem(sf_eth_net);
+      free_str_list(sf_eth_dev);
+      if(
         /* there is 'mv643xx_eth.0', 'mv643xx_eth.1' and 'mv643xx_eth_shared.' 
*/
-        sf_eth_dev && sf_eth_net &&
+        is_net &&
         strstr(platform_type, "mv643xx_eth") &&
         !mv643xx_eth_seen++
       ) {
         add_mv643xx_eth(hd_data, sf_bus_e->str, platform_type);
       }
+      else if(is_net) {
+        hd = add_hd_entry(hd_data, __LINE__, 0);
+        hd->base_class.id = bc_network;
+        hd->sub_class.id = 0;
+        str_printf(&hd->device.name, 0, "ARM Ethernet %d", hd->slot);
+        hd->modalias = new_str(platform_type);
+        hd->sysfs_id = new_str(hd_sysfs_id(sf_dev));
+        hd->sysfs_bus_id = new_str(sf_bus_e->str);
+        s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1);
+        if(s) add_str_list(&hd->drivers, s);
+      }
+      else if(is_storage) {
+        hd = add_hd_entry(hd_data, __LINE__, 0);
+        hd->base_class.id = bc_storage;
+        hd->sub_class.id = sc_sto_ide;
+        str_printf(&hd->device.name, 0, "ARM SATA %d", hd->slot);
+        hd->modalias = new_str(platform_type);
+        hd->sysfs_id = new_str(hd_sysfs_id(sf_dev));
+        hd->sysfs_bus_id = new_str(sf_bus_e->str);
+        s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1);
+        if(s) add_str_list(&hd->drivers, s);
+      }
+      else if(is_usb) {
+        hd = add_hd_entry(hd_data, __LINE__, 0);
+        hd->base_class.id = bc_serial;
+        hd->sub_class.id = sc_ser_usb;
+
+        str_printf(&hd->device.name, 0, "ARM USB %d", hd->slot);
+        hd->modalias = new_str(platform_type);
+        hd->sysfs_id = new_str(hd_sysfs_id(sf_dev));
+        hd->sysfs_bus_id = new_str(sf_bus_e->str);
+        s = hd_sysfs_find_driver(hd_data, hd->sysfs_id, 1);
+        if(s) add_str_list(&hd->drivers, s);
+      }
       free_mem(platform_type);
-      free_mem(sf_eth_net);
-      free_str_list(sf_eth_dev);
     }
 
     free_mem(sf_dev);
@@ -1563,6 +1614,7 @@
   free_str_list(sf_bus);
 }
 
+
 /*
  * uisvirtpci
  */
@@ -1634,5 +1686,6 @@
 
   free_str_list(sf_bus);
 }
+
 /** @} */
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to