Files
s390-tools/ziomon
Fedor Loshakov a92ee5ba8d ziomon/ziorep_config: fix for SCSI devices of type disk without block dev
If system configuration contains zfcp-attached SCSI devices of Peripheral
Device Type disk, but without block device, e.g. because the storage reports
Peripheral Qualifier 1 in INQUIRY, ziorep_config tool issue the
following type of errors during generation of .config file from .cfg
file:

$ ziorep_config -I -i test.cfg
Unpacking configuration ...Done.
Use of uninitialized value in subroutine entry at /usr/sbin/ziorep_config line 36.
Use of uninitialized value in subroutine entry at /usr/sbin/ziorep_config line 36.
Use of uninitialized value in subroutine entry at /usr/sbin/ziorep_config line 54.
Use of uninitialized value in subroutine entry at /usr/sbin/ziorep_config line 135.
...

Such errors can also be seen during printing of adapter, device and map
reports:

$ ziorep_config -ADM -i test.cfg
Unpacking configuration ...Done.
Use of uninitialized value in subroutine entry at /usr/sbin/ziorep_config line 36.
Use of uninitialized value in subroutine entry at /usr/sbin/ziorep_config line 36.
Use of uninitialized value in subroutine entry at /usr/sbin/ziorep_config line 54.
Use of uninitialized value in subroutine entry at /usr/sbin/ziorep_config line 135.
...

This is because ziorep_config reads block device parameters from
non-existent block device subdirectory. And therefore ziorep_config
leaves block device major:minor number column empty in .config file
instead of filling it with 0:0 preset value afterwards.

As a consequence, ziorep_traffic tool, which is using .config file to
get information about devices, reports the following error:

$ ziorep_traffic test
Extracting config data...done
ziorep_traffic: Could not parse line 1 - configuration file broken?

To fix this, skip reading the block device parameters for such
devices, and use the preset values that have been set before
instead.

Signed-off-by: Fedor Loshakov <loshakov@linux.ibm.com>
Suggested-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Reviewed-by: Steffen Maier <maier@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2023-03-17 10:56:11 +01:00
..
2017-08-21 10:55:40 +02:00
2022-05-10 13:33:24 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00
2017-08-21 10:55:40 +02:00