Hello community,

here is the log from the commit of package hwinfo for openSUSE:Factory checked 
in at 2014-03-31 20:43:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-03-27 
06:12:50.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.hwinfo.new/hwinfo.changes       2014-03-31 
20:43:32.000000000 +0200
@@ -1,0 +2,14 @@
+Mon Mar 31 11:13:05 CEST 2014 - [email protected]
+
+- Changed the logic for IUCV detection to only include netiucv type devices
+  Since /sys/bus/iucv/devices/ contains a "generic" netiucv entry as well
+  as any activated devices,such as netiucv0, or netiucv1, the extra logic
+  to add an unactivated device is no longer needed, so it has been removed.
+
+-------------------------------------------------------------------
+Fri Mar 28 08:42:12 CET 2014 - [email protected]
+
+- xen vm: use memory settings from /proc/xen/balloon (bnc #867915)
+- avoid strcpy() (bnc #870383)
+
+-------------------------------------------------------------------

Old:
----
  hwinfo-21.1.tar.bz2

New:
----
  hwinfo-21.3.tar.bz2

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

Other differences:
------------------
++++++ hwinfo.spec ++++++
--- /var/tmp/diff_new_pack.wLOTNT/_old  2014-03-31 20:43:32.000000000 +0200
+++ /var/tmp/diff_new_pack.wLOTNT/_new  2014-03-31 20:43:32.000000000 +0200
@@ -36,9 +36,9 @@
 Group:          Hardware/Other
 # Until migration to github this should be correct url
 Url:            http://gitorious.org/opensuse/hwinfo
-Version:        21.1
+Version:        21.3
 Release:        0
-Source:         hwinfo-21.1.tar.bz2
+Source:         hwinfo-21.3.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description

++++++ hwinfo-21.1.tar.bz2 -> hwinfo-21.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.1/VERSION new/hwinfo-21.3/VERSION
--- old/hwinfo-21.1/VERSION     2014-03-24 13:46:24.000000000 +0100
+++ new/hwinfo-21.3/VERSION     2014-03-31 11:12:56.000000000 +0200
@@ -1 +1 @@
-21.1
+21.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.1/changelog new/hwinfo-21.3/changelog
--- old/hwinfo-21.1/changelog   2014-03-24 13:46:25.000000000 +0100
+++ new/hwinfo-21.3/changelog   2014-03-31 11:12:57.000000000 +0200
@@ -1,4 +1,18 @@
-2014-03-24:    HEAD
+2014-03-31:    HEAD
+       - Merge pull request #3 from openSUSE/bnc853635
+       - Removed an unnecessary newline from dump_line call.
+       - Removed an unnecessary newline from dump_line call.
+         h->rom_id for IUCV connections already has a newline at the end.
+       - Changed the logic for IUCV detection to only include netiucv type 
devices
+         Since /sys/bus/iucv/devices/ contains a "generic" netiucv entry as 
well
+         as any activated devices,such as netiucv0, or netiucv1, the extra 
logic
+         to add an unactivated device is no longer needed, so it has been 
removed.
+
+2014-03-28:    21.2
+       - xen vm: use memory settings from /proc/xen/balloon (bnc #867915)
+       - avoid strcpy() (bnc #870383)
+
+2014-03-24:    21.1
        - 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.1/src/hd/hd_int.h 
new/hwinfo-21.3/src/hd/hd_int.h
--- old/hwinfo-21.1/src/hd/hd_int.h     2013-11-27 15:59:28.000000000 +0100
+++ new/hwinfo-21.3/src/hd/hd_int.h     2014-03-27 11:19:48.000000000 +0100
@@ -25,6 +25,7 @@
 #define PROC_ISAPNP            "/proc/isapnp"
 #define PROC_PARTITIONS                "/proc/partitions"
 #define PROC_APM               "/proc/apm"
+#define PROC_XEN_BALLOON       "/proc/xen/balloon"
 
 #define DEV_NVRAM              "/dev/nvram"
 #define DEV_PSAUX              "/dev/psaux"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.1/src/hd/hdp.c new/hwinfo-21.3/src/hd/hdp.c
--- old/hwinfo-21.1/src/hd/hdp.c        2014-03-24 13:40:29.000000000 +0100
+++ new/hwinfo-21.3/src/hd/hdp.c        2014-03-31 09:25:37.000000000 +0200
@@ -497,7 +497,7 @@
     dump_line("PROM id: %s\n", h->rom_id);
 #endif
 #if defined(__s390__) || defined(__s390x__)
-    dump_line("IUCV user: %s\n", h->rom_id);
+    dump_line("IUCV user: %s", h->rom_id);
 #endif
   }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.1/src/hd/klog.c 
new/hwinfo-21.3/src/hd/klog.c
--- old/hwinfo-21.1/src/hd/klog.c       2013-11-27 15:59:28.000000000 +0100
+++ new/hwinfo-21.3/src/hd/klog.c       2014-03-27 09:56:54.000000000 +0100
@@ -65,7 +65,7 @@
       while(*s && *s != ']') s++;
       if(*s) s++;
       if(*s) s++;      // skip space
-      strcpy(str + 3, s);
+      for(str += 3; (*str++ = *s++););
     }
   }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.1/src/hd/memory.c 
new/hwinfo-21.3/src/hd/memory.c
--- old/hwinfo-21.1/src/hd/memory.c     2013-10-07 13:45:32.000000000 +0200
+++ new/hwinfo-21.3/src/hd/memory.c     2014-03-27 11:20:05.000000000 +0100
@@ -21,11 +21,12 @@
 uint64_t klog_mem(hd_data_t *hd_data, uint64_t *alt);
 uint64_t klog_mem2(hd_data_t *hd_data);
 uint64_t meminfo_mem(hd_data_t *hd_data);
+uint64_t meminfo_xen(hd_data_t *hd_data);
 
 void hd_scan_memory(hd_data_t *hd_data)
 {
   hd_t *hd;
-  uint64_t kcore, klog, klog_alt, klog2, meminfo, msize0, msize1, u;
+  uint64_t kcore, klog, klog_alt, klog2, meminfo, msize0, msize1, memxen, u;
   hd_res_t *res;
   int i;
   int exact;
@@ -44,6 +45,7 @@
   klog2 = klog_mem2(hd_data);
   if(klog2 > klog) klog = klog2;
   meminfo = meminfo_mem(hd_data);
+  memxen = meminfo_xen(hd_data);
 
   msize0 = meminfo > klog ? meminfo : klog;
   if(!msize0) msize0 = kcore;
@@ -63,6 +65,12 @@
   if(meminfo > msize1) { msize1 = meminfo; exact = 0; }
   if(klog_alt > msize0) msize0 = klog_alt;
 
+  // if we are in a xen vm, trust this value
+  if(memxen) {
+    msize0 = msize1 = memxen;
+    exact = 1;
+  }
+
   hd = add_hd_entry(hd_data, __LINE__, 0);
   hd->base_class.id = bc_internal;
   hd->sub_class.id = sc_int_main_mem;
@@ -209,6 +217,24 @@
 
   return u;
 }
+
+uint64_t meminfo_xen(hd_data_t *hd_data)
+{
+  uint64_t u = 0, u0;
+  str_list_t *sl;
+
+  sl = read_file(PROC_XEN_BALLOON, 0, 1);
+
+  if(sl && sscanf(sl->str, "Current allocation: %"SCNu64"", &u0) == 1) {
+    u = u0 << 10;
+  }
+
+  free_str_list(sl);
+
+  ADD2LOG("  xen balloon:    0x%"PRIx64"\n", u);
+
+  return u;
+}
 
 /** @} */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hwinfo-21.1/src/hd/s390.c 
new/hwinfo-21.3/src/hd/s390.c
--- old/hwinfo-21.1/src/hd/s390.c       2013-10-07 13:45:32.000000000 +0200
+++ new/hwinfo-21.3/src/hd/s390.c       2014-03-31 09:25:37.000000000 +0200
@@ -91,7 +91,6 @@
   if(bus_group) while((curdev = readdir(bus_group)))
   {
     DIR* d;
-    struct dlist* dl;
     struct dirent* cl;
     
     if(curdev->d_type == DT_DIR) continue;     // skip "." and ".."
@@ -241,24 +240,19 @@
 
   if(virtual_machine)
   {
-       /* add an unactivated IUCV device */
-       hd=add_hd_entry(hd_data,__LINE__,0);
-       hd->vendor.id=MAKE_ID(TAG_SPECIAL,0x6001); /* IBM */
-       hd->device.id=MAKE_ID(TAG_SPECIAL,0x0005); /* IUCV */
-       hd->bus.id=bus_iucv;
-       hd->base_class.id=bc_network;
-       hd->status.active=status_no;
-       hd->status.available=status_yes;
-       hddb_add_info(hd_data,hd);
-       
-       /* add activated IUCV devices */
+       /* add an unactivated IUCV device (by finding 
/sys/bus/iucv/devices/netiucv/ */
+       /* and any activated IUCV devices (by finding 
/sys/bus/iucv/devices/netiucv??/ */
        bus = opendir("/sys/bus/" BUSNAME_IUCV "/devices");
        
        if(bus)
        {
           while((curdev = readdir(bus)))
           {
-            if(curdev->d_type == DT_DIR) continue;     // skip "." and ".."
+            // skip ".", "..", and any entries that aren't "netiucv"
+            if(
+               curdev->d_type == DT_DIR ||
+               strncmp(curdev->d_name, "netiucv", sizeof "netiucv" -1)
+            ) continue;
             hd=add_hd_entry(hd_data,__LINE__,0);
             hd->vendor.id=MAKE_ID(TAG_SPECIAL,0x6001); /* IBM */
             hd->device.id=MAKE_ID(TAG_SPECIAL,0x0005); /* IUCV */

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

Reply via email to