Hello community,

here is the log from the commit of package powerpc-utils for openSUSE:Factory 
checked in at 2019-06-22 11:22:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/powerpc-utils (Old)
 and      /work/SRC/openSUSE:Factory/.powerpc-utils.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "powerpc-utils"

Sat Jun 22 11:22:52 2019 rev:96 rq:710326 version:1.3.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/powerpc-utils/powerpc-utils.changes      
2019-02-04 21:21:56.659646404 +0100
+++ /work/SRC/openSUSE:Factory/.powerpc-utils.new.4615/powerpc-utils.changes    
2019-06-22 11:22:53.509303124 +0200
@@ -1,0 +2,26 @@
+Tue Jun 11 15:15:48 UTC 2019 - [email protected]
+
+- Update to version 1.3.7:
+  - lparstat:
+    - add an option to print the lparstat report similar to
+      legacy lparstat tool
+    - introduce the help command line option to print
+      lparstat usage
+    - restrict the physc and entc attribute values to two decimal
+      places
+    - correct calculation of physc to use tbr
+    - Enable desired and maximum memory stats
+    - Show available physical processors in the shared pool
+  - scripts: Improve handling of errors from subsidiary scripts
+  - man/update_flash:
+    - Add details to extract rpm format image
+    - Fix man page
+  - ppc64_cpu: Limit number of CPUs for frequency calculation
+  - lsslot:
+    - Add ibm,dynamic-memory-v2 parsing capability
+    - Split dynamic-memory v1 parsing into separate routine
+  - Patch to display logical name using bootlist -o option
+  [jsc#SLE-6176, ofpathname_powernv.patch,
+   Revert-lparstat-Show-available-physical-processors-i.patch]
+
+-------------------------------------------------------------------

Old:
----
  powerpc-utils-1.3.6.tar.gz

New:
----
  powerpc-utils-1.3.7.tar.gz

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

Other differences:
------------------
++++++ powerpc-utils.spec ++++++
--- /var/tmp/diff_new_pack.ybu9BI/_old  2019-06-22 11:22:54.097303765 +0200
+++ /var/tmp/diff_new_pack.ybu9BI/_new  2019-06-22 11:22:54.097303765 +0200
@@ -12,18 +12,18 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via https://bugs.opensuse.org/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
 
 %define version_unconverted 1.3.6
 Name:           powerpc-utils
-Version:        1.3.6
+Version:        1.3.7
 Release:        0
 Summary:        Utilities for PowerPC Hardware
 License:        GPL-2.0-or-later
 Group:          System/Management
-URL:            https://github.com/ibm-power-utilities/powerpc-utils
+Url:            https://github.com/ibm-power-utilities/powerpc-utils
 Source0:        
https://github.com/ibm-power-utilities/powerpc-utils/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 Source1:        nvsetenv
 Patch1:         powerpc-utils-lsprop.patch

++++++ Revert-lparstat-Show-available-physical-processors-i.patch ++++++
--- /var/tmp/diff_new_pack.ybu9BI/_old  2019-06-22 11:22:54.125303795 +0200
+++ /var/tmp/diff_new_pack.ybu9BI/_new  2019-06-22 11:22:54.129303800 +0200
@@ -1,21 +1,8 @@
-From 5e508839f2b928c83a163975ff6a7e4112926a3d Mon Sep 17 00:00:00 2001
-From: Michal Suchanek <[email protected]>
-Date: Mon, 17 Dec 2018 13:45:28 +0100
-Subject: [PATCH] Revert "lparstat: Show available physical processors in the
- shared pool"
-
-This reverts commit d1576f88dcc7008bcd3448172caff1b928be1254.
----
- man/lparstat.8 |  3 --
- src/lparstat.c | 75 ++++----------------------------------------------
- src/lparstat.h | 10 -------
- 3 files changed, 5 insertions(+), 83 deletions(-)
-
-diff --git a/man/lparstat.8 b/man/lparstat.8
-index 9721580b029f..daa578d122c6 100644
---- a/man/lparstat.8
-+++ b/man/lparstat.8
-@@ -77,9 +77,6 @@ Shows the percentage of the entitled capacity consumed. 
Because the time base ov
+Index: powerpc-utils-1.3.7/man/lparstat.8
+===================================================================
+--- powerpc-utils-1.3.7.orig/man/lparstat.8
++++ powerpc-utils-1.3.7/man/lparstat.8
+@@ -83,9 +83,6 @@ Shows the percentage of the entitled cap
  lbusy
  Shows the percentage of logical processor(s) utilization that occurred while 
executing at the user and system level. 
  .TP
@@ -25,11 +12,11 @@
  phint
  Shows the number of phantom (targeted to another shared partition in this 
pool) interruptions received. 
  .SH OPTIONS
-diff --git a/src/lparstat.c b/src/lparstat.c
-index ec57c1a22bdc..a3a0155dce2a 100644
---- a/src/lparstat.c
-+++ b/src/lparstat.c
-@@ -123,32 +123,6 @@ int get_time_base()
+Index: powerpc-utils-1.3.7/src/lparstat.c
+===================================================================
+--- powerpc-utils-1.3.7.orig/src/lparstat.c
++++ powerpc-utils-1.3.7/src/lparstat.c
+@@ -126,32 +126,6 @@ int get_time_base()
        return 0;
  }
  
@@ -62,8 +49,8 @@
  void get_cpu_physc(struct sysentry *unused_se, char *buf)
  {
        struct sysentry *se;
-@@ -191,44 +165,6 @@ void get_per_entc(struct sysentry *unused_se, char *buf)
-       sprintf(buf, "%.6f", atof(physc) / atof(entc) * 100.0);
+@@ -194,44 +168,6 @@ void get_per_entc(struct sysentry *unuse
+       sprintf(buf, "%.2f", atof(physc) / atof(entc) * 100.0);
  }
  
 -void get_cpu_app(struct sysentry *unused_se, char *buf)
@@ -107,7 +94,7 @@
  int parse_lparcfg()
  {
        FILE *f;
-@@ -601,13 +537,13 @@ int print_iflag_data()
+@@ -615,14 +551,14 @@ int print_iflag_data()
  
  void print_default_output(int interval, int count)
  {
@@ -115,7 +102,8 @@
 +      char *fmt = "%5s %5s %5s %8s %8s %5s %5s %5s %5s\n";
        char *descr;
        char buf[128];
-       int offset;
+       int offset, smt, active_proc;
+       char type[32];
        char value[32];
        char user[32], sys[32], wait[32], idle[32], physc[32], entc[32];
 -      char lbusy[32], app[32], vcsw[32], phint[32];
@@ -123,7 +111,7 @@
  
        memset(buf, 0, 128);
        get_sysdata("shared_processor_mode", &descr, value);
-@@ -628,9 +564,9 @@ void print_default_output(int interval, int count)
+@@ -657,9 +593,9 @@ void print_default_output(int interval,
        fprintf(stdout, "\nSystem Configuration\n%s\n\n", buf);
  
        fprintf(stdout, fmt, "\%user", "\%sys", "\%wait", "\%idle", "physc",
@@ -135,7 +123,7 @@
  
        do {
                if (interval) {
-@@ -647,10 +583,9 @@ void print_default_output(int interval, int count)
+@@ -676,10 +612,9 @@ void print_default_output(int interval,
                get_sysdata("physc", &descr, physc);
                get_sysdata("per_entc", &descr, entc);
                get_sysdata("phint", &descr, phint);
@@ -147,11 +135,11 @@
                fflush(stdout);
        } while (--count > 0);
  }
-diff --git a/src/lparstat.h b/src/lparstat.h
-index 3aee19268f83..7504d87b394a 100644
---- a/src/lparstat.h
-+++ b/src/lparstat.h
-@@ -46,8 +46,6 @@ extern void get_smt_mode(struct sysentry *, char *);
+Index: powerpc-utils-1.3.7/src/lparstat.h
+===================================================================
+--- powerpc-utils-1.3.7.orig/src/lparstat.h
++++ powerpc-utils-1.3.7/src/lparstat.h
+@@ -46,8 +46,6 @@ extern void get_smt_mode(struct sysentry
  extern void get_cpu_stat(struct sysentry *, char *);
  extern void get_cpu_physc(struct sysentry *, char *);
  extern void get_per_entc(struct sysentry *, char *);
@@ -182,6 +170,3 @@
        {.name[0] = '\0'},
  };
  
--- 
-2.19.2
-

++++++ ofpathname_powernv.patch ++++++
--- /var/tmp/diff_new_pack.ybu9BI/_old  2019-06-22 11:22:54.157303830 +0200
+++ /var/tmp/diff_new_pack.ybu9BI/_new  2019-06-22 11:22:54.157303830 +0200
@@ -1,11 +1,11 @@
-Index: powerpc-utils-1.3.4/scripts/ofpathname
+Index: powerpc-utils-1.3.7/scripts/ofpathname
 ===================================================================
---- powerpc-utils-1.3.4.orig/scripts/ofpathname
-+++ powerpc-utils-1.3.4/scripts/ofpathname
+--- powerpc-utils-1.3.7.orig/scripts/ofpathname
++++ powerpc-utils-1.3.7/scripts/ofpathname
 @@ -1632,7 +1632,7 @@ of2l_nvme()
  . $PSERIES_PLATFORM
  if [[ $platform = $PLATFORM_POWERNV ]]; then
-       echo "$OFPATHNAME: is not supported on the $platform_name platform"
+       echo "$OFPATHNAME: is not supported on the $platform_name platform" 1>&2
 -      exit 1
 +      exit 0
  fi

++++++ powerpc-utils-1.3.6.tar.gz -> powerpc-utils-1.3.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.6/Changelog 
new/powerpc-utils-1.3.7/Changelog
--- old/powerpc-utils-1.3.6/Changelog   2018-12-15 01:18:13.000000000 +0100
+++ new/powerpc-utils-1.3.7/Changelog   2019-06-09 21:16:10.000000000 +0200
@@ -1,3 +1,119 @@
+
+powerpc-utils-1.3.6
+=====================================================================
+
+commit 1d4147370a148b3a2ebadcf02abd4a6c9a763e6d
+Author: Sourabh Jain <[email protected]>
+Date:   Sat Apr 27 10:18:32 2019 +0530
+
+    lparstat: add an option to print the lparstat report similar to legacy 
lparstat tool
+    
+    This patch adds a new command line option (-l, --legacy) to allow
+    users to print the report similar to legacy lprastat tool without
+    affecting existing report format.
+    
+    Changes done to make the current report format similar to legacy
+    report format are listed below:
+    
+    1) The memory attribute will be printed in MB instead of KB.
+    2) cpus attribute will be referred as psize in legacy report format
+       and only printed in shared lpar environment.
+    3) On legacy lparstat tool the lcpu attribute is a combination of
+       two attributes, smt and number of online processor. Formula used
+       to calculate the lcpu is given below.
+                  lcpu = smt * number of online processors
+    
+    Signed-off-by: Sourabh Jain <[email protected]>
+    Reviewed-by: Vasant Hegde <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit dd6da6b329bac2743d1c80b5556b494c923c11ad
+Author: Michael Bringmann <[email protected]>
+Date:   Mon Apr 29 11:25:18 2019 -0500
+
+    scripts: Improve handling of errors from subsidiary scripts
+    
+    This patch is to fix the handling of errors by 'lsdevinfo' from
+    invocations of 'ofpathname' that also encounter errors.  Error
+    messages from 'ofpathname' were being sent through 'stdout', and
+    interpreted as valid data by a number of script instructions in
+    'lsdevinfo'.  Following is an example of such a failure when the
+    error results were forwarded to an associated HMC.
+    
+        2019-02-19 22:05:38.212 [TID-5f68--72195] VIOS_CACHE: CacheVios.<-> 
saveCacheData 3*9080-M9S*130A068 cmd=lsdevinfo -c -q 
physloc=U78CD.001.FZH0128-P1-C1-T3-S4 -F status
+        2019-02-19 22:05:38.212 [TID-5f68--72195] RMC_VIOS: 
PIRmcViosClient.stdErr=/bin/ls: cannot access /sys/class/net/ofpathname:: No 
such file or directory
+        /bin/ls: cannot access Could: No such file or directory
+        /bin/ls: cannot access not: No such file or directory
+        /bin/ls: cannot access retrieve: No such file or directory
+        /bin/ls: cannot access logical: No such file or directory
+        /bin/ls: cannot access device: No such file or directory
+        /bin/ls: cannot access name: No such file or directory
+        /bin/ls: cannot access for: No such file or directory
+        /bin/ls: cannot access Open: No such file or directory
+        /bin/ls: cannot access Firmware: No such file or directory
+        /bin/ls: cannot access path: No such file or directory
+        /bin/ls: cannot access 
"/pci@800000029008004/ethernet@0"./device/driver: No such file or directory
+    
+    This patch makes the following changes:
+    
+    * Redirects the error messages from 'ofpathname' to stderr
+    * Adds more checks to 'lsdevinfo' to filter out stderr text
+      from input to various parsing commands.
+    
+    Signed-off-by: Michael Bringmann <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit 8b7978b114e5df89218daa9b4b48cc0e918ba917
+Author: Sourabh Jain <[email protected]>
+Date:   Mon Feb 4 16:15:14 2019 +0530
+
+    lparstat: introduce the help command line option to print lparstat usage
+    
+    This patch adds a function to print the usage of lparstat. Also,
+    a new element is added to structure option to handle long command
+    line argument for help.
+    
+    Signed-off-by: Sourabh Jain <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit bc928b06605371b72c7fe8ec7e81886114a9e9d4
+Author: Sourabh Jain <[email protected]>
+Date:   Thu Jan 31 14:25:21 2019 +0530
+
+    lparstat: restrict the physc and entc attribute values to two decimal 
places
+    
+    Print format of physical processors consumed (physc) and percentage of
+    the entitled capacity consumed (entc) attributes has changed from six
+    decimal places to two.
+    
+    The least possible value allowed for processor entitlement to a LPAR
+    is 0.05 so printing physc and entc values with such a high precision
+    is incorrect.
+    
+    Signed-off-by: Sourabh Jain <[email protected]>
+    Reviewed-by: Vasant Hegde <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit b5fea40ac98d1c9a685d98c011e88180c31ca0be
+Author: Vasant Hegde <[email protected]>
+Date:   Wed Feb 20 15:44:17 2019 +0530
+
+    man/update_flash: Add details to extract rpm format image
+    
+    Signed-off-by: Vasant Hegde <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
+commit f567bdb8b2a3effdb4af06e2cf935b0350f2f881
+Author: Vasant Hegde <[email protected]>
+Date:   Wed Feb 20 15:44:09 2019 +0530
+
+    man/update_flash: Fix man page
+    
+    Add heading to NOTES section.
+    
+    Signed-off-by: Vasant Hegde <[email protected]>
+    Signed-off-by: Tyrel Datwyler <[email protected]>
+
 powerpc-utils-1.3.6
 =====================================================================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.6/configure.ac 
new/powerpc-utils-1.3.7/configure.ac
--- old/powerpc-utils-1.3.6/configure.ac        2018-12-15 01:18:13.000000000 
+0100
+++ new/powerpc-utils-1.3.7/configure.ac        2019-06-09 21:16:10.000000000 
+0200
@@ -1,6 +1,6 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
-m4_define([ppu_version], 1.3.6)
+m4_define([ppu_version], 1.3.7)
 
 AC_PREREQ([2.63])
 AC_INIT([powerpc-utils], ppu_version, [[email protected]])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.6/man/lparstat.8 
new/powerpc-utils-1.3.7/man/lparstat.8
--- old/powerpc-utils-1.3.6/man/lparstat.8      2018-12-15 01:18:13.000000000 
+0100
+++ new/powerpc-utils-1.3.7/man/lparstat.8      2019-06-09 21:16:10.000000000 
+0200
@@ -9,8 +9,9 @@
 .SH NAME
 lparstat \- Reports logical partition ( LPAR ) related information and 
statistics.
 .SH SYNOPSIS
-.B /usr/sbin/lparstat
-[ -i ] [ interval [ count ] ]
+.B /usr/sbin/lparstat [ options ]
+.HP
+.B /usr/sbin/lparstat <interval> [ count ]
 .SH DESCRIPTION
 The \fIlparstat\fR command provides a report of LPAR related information and 
utilization statistics. This command provides a display of current LPAR related 
parameters and Hypervisor information, as well as utilization statistics for 
the LPAR.
 
@@ -35,6 +36,11 @@
 .TP
 cpus
 Number of online physical processors in the pool. 
+.RS
+This attribute is referred as
+.B psize
+in legacy mode and only available in shared LPAR environment.
+.RE
 .TP
 ent
 Entitled processing capacity in processor units. This information is displayed 
only if the partition type is shared. 
@@ -202,6 +208,37 @@
 The variable memory capacity weight of the LPAR. 
 .TP
 .SH
+.TP
+\fB\-l, --legacy\fR
+Display the report in legacy format.
+.RS
+.RS
+Memory attribute in MB instead of KB.
+.RS
+.RE
+.B cpus
+attribute is referred as
+.B psize
+and only available for shared LPAR.
+.RS
+.RE
+.B lcpu
+attribute calculation: lcpu = smt * number of online processors.
+.RE
+.TP
+.RS
+.SH
+.TP
+\fB\-h, --help\fR
+Display the usage of lparstat.
+.RS
+.SH
+.TP
+\fB\-V, --version\fR
+Display the lparstat version information.
+.RS
+.SH
+.TP
 interval
 The
 .B interval
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.6/man/update_flash.8 
new/powerpc-utils-1.3.7/man/update_flash.8
--- old/powerpc-utils-1.3.6/man/update_flash.8  2018-12-15 01:18:13.000000000 
+0100
+++ new/powerpc-utils-1.3.7/man/update_flash.8  2019-06-09 21:16:10.000000000 
+0200
@@ -196,11 +196,15 @@
   /sys/firmware/opal/{validate/manage/update}_flash
 .fi
 .SH NOTES
+.B Download firmware
+.fi
 Firmware may be downloaded from the IBM website. Instructions for
 downloading and installing the firmware image are also there, and
 information there will be more up-to-date than this page.
 
 .P
+.B Firmware update failure
+.fi
 Various conditions can lead to a firmware update failure. If you
 receive an authentication-related error, such as:
 .P
@@ -222,6 +226,19 @@
 
http://publib.boulder.ibm.com/infocenter/powersys/v3r1m5/index.jsp?topic=/p7hatl/iphblresetserverp6.htm
 
 .P
+.B RPM format image
+.fi
+For "rpm format" images, the file will have a .rpm extension. It can be 
extracted
+using below command:
+
+       rpm2cpio <rpm filename> | cpio -idmv
+.fi
+.P
+This will extract files under current directory. Pass <image>.img file to this 
script.
+
+.P
+.B AIX format image
+.fi
 For older "AIX format" images, the file will have a .BIN extension. This
 zip file happens to be an AIX binary, but it can be extracted with the
 unzip command (with password from the web page):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.6/scripts/lsdevinfo 
new/powerpc-utils-1.3.7/scripts/lsdevinfo
--- old/powerpc-utils-1.3.6/scripts/lsdevinfo   2018-12-15 01:18:13.000000000 
+0100
+++ new/powerpc-utils-1.3.7/scripts/lsdevinfo   2019-06-09 21:16:10.000000000 
+0200
@@ -225,7 +225,7 @@
 # Look at every vNIC device
 for dev in $($LS -d /proc/device-tree/vdevice/vnic* 2> /dev/null); do
     # use ofpathname to get the device name (i.e. eth0)
-    name=$($OFPATHNAME -l $(echo $dev | $SED -e "s/\/proc\/device-tree//"))
+    name=$($OFPATHNAME -l $(echo $dev | $SED -e "s/\/proc\/device-tree//") 2> 
/dev/null)
     connection=$(echo $dev | $SED -e 
"s/\/proc\/device-tree\/vdevice\/l-lan@//")
     parent="vio"
 
@@ -246,7 +246,7 @@
 # Look at every ibmveth (Virtual Ethernet) device 
 for dev in $($LS -d /proc/device-tree/vdevice/l-lan* 2> /dev/null); do 
     # use ofpathname to get the device name (i.e. eth0)
-    name=$($OFPATHNAME -l $(echo $dev | $SED -e "s/\/proc\/device-tree//"))
+    name=$($OFPATHNAME -l $(echo $dev | $SED -e "s/\/proc\/device-tree//") 2> 
/dev/null)
     connection=$(echo $dev | $SED -e 
"s/\/proc\/device-tree\/vdevice\/l-lan@//")
     parent="vio"
 
@@ -268,7 +268,7 @@
 for pci_dev in $($LS -d /proc/device-tree/pci* 2> /dev/null); do 
     for dev in $($LS -d $pci_dev/ethernet* 2> /dev/null); do 
        # use ofpathname to get the device name (i.e. eth0)
-       name=$($OFPATHNAME -l $(echo $dev | $SED -e "s/\/proc\/device-tree//"))
+       name=$($OFPATHNAME -l $(echo $dev | $SED -e "s/\/proc\/device-tree//") 
2> /dev/null)
        connection=$(echo $pci_dev | $SED -e "s/\/proc\/device-tree\/pci@//")
        parent="pci"
 
@@ -280,7 +280,7 @@
        class="adapter"
        subclass="pci"
        prefix="eth"
-       driver=$($LS -l /sys/class/net/$name/device/driver |
+       driver=$($LS -l /sys/class/net/$name/device/driver 2> /dev/null |
                 $SED -e "s/^.*\///")
        status=1
 
@@ -312,11 +312,11 @@
        prefix="host"
        driver="ibmvscsic"
 
-       host=$($LS -d /sys/devices/vio/$slot/host*/)
+       host=$($LS -d /sys/devices/vio/$slot/host*/ 2> /dev/null)
        if [[ -d $host/scsi_host ]]; then
-            scsihost=$($LS -d $host/scsi_host/host*/)
+            scsihost=$($LS -d $host/scsi_host/host*/ 2> /dev/null)
        else
-            scsihost=$($LS -d $host/scsi_host*/)
+            scsihost=$($LS -d $host/scsi_host*/ 2> /dev/null)
        fi
 
        if [[ $(cat $scsihost/state) == "running" ]] ; then
@@ -365,12 +365,12 @@
         fi
 
        # loop through the targets for this host. 
-       for t in $($LS -d $host/target*); do
+       for t in $($LS -d $host/target* 2> /dev/null); do
            target=$(echo $($LS -d $t/$($LS $t | $GREP -v uevent | $GREP -v 
power | $GREP -v subsystem)))
            if [[ ! -d $target/block ]]; then
-                name=$(echo $($LS -d $target/block*) | $SED -e "s/.*://")
+                name=$(echo $($LS -d $target/block* 2> /dev/null) | $SED -e 
"s/.*://")
            else
-                name=$($LS $target/block)
+                name=$($LS $target/block 2> /dev/null)
            fi
 
            conn=$($OFPATHNAME /dev/$name 2> /dev/null | $SED -e "s/.*disk@//")
@@ -446,7 +446,7 @@
     slot=$(echo $dev | $SED -e "s/\/proc\/device-tree\/vdevice\/vfc-client@//")
 
     # there is only one host per device, assign it to the path's name
-    for host in $($LS -d /sys/devices/vio/$slot/host*) ; do
+    for host in $($LS -d /sys/devices/vio/$slot/host* 2> /dev/null) ; do
        parent=$(echo $host | $SED -e "s/.*\///")
        name=$parent
 
@@ -457,11 +457,11 @@
        prefix="host"
        driver="ibmvfc"
 
-       host=$($LS -d /sys/devices/vio/$slot/host*/)
+       host=$($LS -d /sys/devices/vio/$slot/host*/ 2> /dev/null)
        if [[ -d $host/scsi_host ]]; then
-            scsihost=$($LS -d $host/scsi_host/host*/)
+            scsihost=$($LS -d $host/scsi_host/host*/ 2> /dev/null)
        else
-            scsihost=$($LS -d $host/scsi_host*/)
+            scsihost=$($LS -d $host/scsi_host*/ 2> /dev/null)
        fi
 
        if [[ $(cat $scsihost/state) == "running" ]] ; then
@@ -510,16 +510,16 @@
         fi
 
        # As opposed to ibmvscsi, there are multiple rports in each host
-       for rport in $($LS -d $host/rport*); do
+       for rport in $($LS -d $host/rport* 2> /dev/null); do
 
            # in ibmvfc there are two layers of directories before getting to
            # the targets
-           for t in $($LS -d $rport/target*); do
+           for t in $($LS -d $rport/target* 2> /dev/null); do
                for target in $($LS $t | $GREP "[0-9]*:[0-9]*:[0-9]*:[0-9]*"); 
do
                    if [[ ! -d $t/$target/block ]]; then
                         name=$(echo $($LS -d $t/$target/block*) | $SED -e 
"s/.*://")
                    else
-                        name=$($LS $t/$target/block)
+                        name=$($LS $t/$target/block 2> /dev/null)
                    fi
 
                    connection=$($OFPATHNAME /dev/$name 2> /dev/null | $SED -e 
"s/.*disk@//")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.6/scripts/ofpathname 
new/powerpc-utils-1.3.7/scripts/ofpathname
--- old/powerpc-utils-1.3.6/scripts/ofpathname  2018-12-15 01:18:13.000000000 
+0100
+++ new/powerpc-utils-1.3.7/scripts/ofpathname  2019-06-09 21:16:10.000000000 
+0200
@@ -84,20 +84,20 @@
     fi
 
     case $emsg in
-        1)  echo "$OFPATHNAME: Could not retrieve Open Firmware device path"
-            echo "            for logical device \"$DEVNAME_ARG\"." ;;
+        1)  echo "$OFPATHNAME: Could not retrieve Open Firmware device path" 
1>&2
+            echo "            for logical device \"$DEVNAME_ARG\"." 1>&2 ;;
 
-        2)  echo "$OFPATHNAME: sysfs (/sys) is needed and does not appear"
-            echo "            to be mounted on this system." ;;
+        2)  echo "$OFPATHNAME: sysfs (/sys) is needed and does not appear" 1>&2
+            echo "            to be mounted on this system." 1>&2 ;;
 
-        3)  echo "$OFPATHNAME: Could not find sysfs information for logical"
-            echo "            device \"$DEVNAME_ARG\"." ;;
+        3)  echo "$OFPATHNAME: Could not find sysfs information for logical" 
1>&2
+            echo "            device \"$DEVNAME_ARG\"." 1>&2 ;;
 
-        4)  echo "$OFPATHANME: Logical device \"$DEVNAME_ARG\" does not appear"
-            echo "            to be configured." ;;
+        4)  echo "$OFPATHANME: Logical device \"$DEVNAME_ARG\" does not 
appear" 1>&2
+            echo "            to be configured." 1>&2 ;;
 
-        5)  echo "$OFPATHNAME: Could not retrieve logical device name for"
-            echo "            Open Firmware path \"$DEVNAME_ARG\"."
+        5)  echo "$OFPATHNAME: Could not retrieve logical device name for" 1>&2
+            echo "            Open Firmware path \"$DEVNAME_ARG\"." 1>&2 ;;
     esac
 
     exit 1
@@ -1631,7 +1631,7 @@
 #
 . $PSERIES_PLATFORM
 if [[ $platform = $PLATFORM_POWERNV ]]; then
-       echo "$OFPATHNAME: is not supported on the $platform_name platform"
+       echo "$OFPATHNAME: is not supported on the $platform_name platform" 1>&2
        exit 1
 fi
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/powerpc-utils-1.3.6/src/lparstat.c 
new/powerpc-utils-1.3.7/src/lparstat.c
--- old/powerpc-utils-1.3.6/src/lparstat.c      2018-12-15 01:18:13.000000000 
+0100
+++ new/powerpc-utils-1.3.7/src/lparstat.c      2019-06-09 21:16:10.000000000 
+0200
@@ -23,6 +23,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdbool.h>
 #include <string.h>
 #include <getopt.h>
 #include <unistd.h>
@@ -35,6 +36,8 @@
 #define SE_NOT_FOUND   "???"
 #define SE_NOT_VALID   "-"
 
+static bool o_legacy = false;
+
 struct sysentry *get_sysentry(char *name)
 {
        struct sysentry *se = &system_data[0];
@@ -176,7 +179,7 @@
                physc = (new_purr - old_purr)/timebase/elapsed;
        }
 
-       sprintf(buf, "%.6f", physc);
+       sprintf(buf, "%.2f", physc);
 }
 
 void get_per_entc(struct sysentry *unused_se, char *buf)
@@ -188,7 +191,7 @@
        get_sysdata("DesEntCap", &descr, entc);
        get_sysdata("physc", &descr, physc);
 
-       sprintf(buf, "%.6f", atof(physc) / atof(entc) * 100.0);
+       sprintf(buf, "%.2f", atof(physc) / atof(entc) * 100.0);
 }
 
 void get_cpu_app(struct sysentry *unused_se, char *buf)
@@ -479,7 +482,7 @@
 {
        FILE *f;
        char line[128];
-       char *mem, *nl, *first_line;
+       char *mem, *nl, *first_line, *unit;
 
        f = fopen("/proc/meminfo", "r");
        if (!f) {
@@ -500,10 +503,21 @@
                mem++;
        } while (*mem == ' ');
 
-       nl = strchr(mem, '\n');
+       unit = strchr(mem, ' ');
+       *unit = '\0';
+
+       do {
+               unit++;
+       } while (*unit == ' ');
+
+       nl = strchr(unit, '\n');
        *nl = '\0';
 
-       sprintf(buf, "%s", mem);
+       if (o_legacy) {
+               sprintf(buf, "%d %s", atoi(mem) / 1024, "MB");
+       } else {
+               sprintf(buf, "%s %s", mem, unit);
+       }
 }
 
 void get_smt_mode(struct sysentry *se, char *buf)
@@ -604,7 +618,8 @@
        char *fmt = "%5s %5s %5s %8s %8s %5s %5s %5s %5s %5s\n";
        char *descr;
        char buf[128];
-       int offset;
+       int offset, smt, active_proc;
+       char type[32];
        char value[32];
        char user[32], sys[32], wait[32], idle[32], physc[32], entc[32];
        char lbusy[32], app[32], vcsw[32], phint[32];
@@ -612,16 +627,30 @@
        memset(buf, 0, 128);
        get_sysdata("shared_processor_mode", &descr, value);
        offset = sprintf(buf, "type=%s ", value);
+       sprintf(type, "%s", value);
        get_sysdata("capped", &descr, value);
        offset += sprintf(buf + offset, "mode=%s ", value);
        get_sysdata("smt_state", &descr, value);
        offset += sprintf(buf + offset, "smt=%s ", value);
+       if (!strcmp(value, "Off"))
+               smt = 1;
+       else
+               smt = atoi(value);
        get_sysdata("partition_active_processors", &descr, value);
-       offset += sprintf(buf + offset, "lcpu=%s ", value);
+       active_proc = atoi(value);
+       if (o_legacy)
+               offset += sprintf(buf + offset, "lcpu=%d ", active_proc*smt);
+       else
+               offset += sprintf(buf + offset, "lcpu=%s ", value);
        get_sysdata("MemTotal", &descr, value);
        offset += sprintf(buf + offset, "mem=%s ", value);
        get_sysdata("active_cpus_in_pool", &descr, value);
-       offset += sprintf(buf + offset, "cpus=%s ", value);
+       if (o_legacy) {
+               if (strcmp(type, "Dedicated"))
+                       offset += sprintf(buf + offset, "psize=%s ", value);
+       } else {
+               offset += sprintf(buf + offset, "cpus=%s ", value);
+       }
        get_sysdata("DesEntCap", &descr, value);
        offset += sprintf(buf + offset, "ent=%s ", value);
 
@@ -655,8 +684,22 @@
        } while (--count > 0);
 }
 
+static void usage(void)
+{
+       printf("Usage:  lparstat [ options ]\n\tlparstat <interval> [ count 
]\n\n"
+              "options:\n"
+              "\t-h, --help            Show this message and exit.\n"
+              "\t-V, --version \tDisplay lparstat version information.\n"
+              "\t-i                    Lists details on the LPAR 
configuration.\n"
+              "\t-l, --legacy          Print the report in legacy format.\n"
+              "interval                The interval parameter specifies the 
amount of time between each report.\n"
+              "count                   The count parameter specifies how many 
reports will be displayed.\n");
+}
+
 static struct option long_opts[] = {
        {"version",     no_argument,    NULL,   'V'},
+       {"help",        no_argument,    NULL,   'h'},
+       {"legacy",      no_argument,    NULL,   'l'},
        {0, 0, 0, 0},
 };
 
@@ -672,16 +715,24 @@
                exit(1);
        }
 
-       while ((c = getopt_long(argc, argv, "iV",
+       while ((c = getopt_long(argc, argv, "iVhl",
                                long_opts, &opt_index)) != -1) {
                switch(c) {
                        case 'i':
                                i_option = 1;
                                break;
+                       case 'l':
+                               o_legacy = true;
+                               break;
                        case 'V':
                                printf("lparstat - %s\n", VERSION);
                                return 0;
+                       case 'h':
+                               usage();
+                               return 0;
                        case '?':
+                               usage();
+                               return 1;
                        default:
                                break;
                }

++++++ systemd-dir.patch ++++++
--- /var/tmp/diff_new_pack.ybu9BI/_old  2019-06-22 11:22:54.273303957 +0200
+++ /var/tmp/diff_new_pack.ybu9BI/_new  2019-06-22 11:22:54.277303961 +0200
@@ -1,7 +1,7 @@
-Index: powerpc-utils-1.3.4/Makefile.am
+Index: powerpc-utils-1.3.7/Makefile.am
 ===================================================================
---- powerpc-utils-1.3.4.orig/Makefile.am
-+++ powerpc-utils-1.3.4/Makefile.am
+--- powerpc-utils-1.3.7.orig/Makefile.am
++++ powerpc-utils-1.3.7/Makefile.am
 @@ -181,7 +181,7 @@ src_drmgr_lsslot_LDADD = -lrtas
  
  if WITH_SYSTEMD


Reply via email to