ziomon/ziorep_config: fix missing SG major:minor for disk block devices

The value of "generic/dev" exists and can be retrieved directly under
the SCSI device directory, not under the disk block device subdirectory,
where the global variable $c_src points to after
$c_src = $devices{$hctl}{dev}; command.

So move the sg_mm retrieval before the block device parameters
retrieval.

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>
This commit is contained in:
Fedor Loshakov
2023-03-09 13:51:20 +01:00
committed by Jan Höppner
parent 4941fc15c0
commit 46c291835f

View File

@@ -123,11 +123,11 @@ sub get_device_data
} else {
$devices{$hctl}{dev} = glob_last("block\:sd*");
}
$devices{$hctl}{sg_mm} = get_line("generic", "dev");
$c_src = $devices{$hctl}{dev};
$devices{$hctl}{dev} =~ s/.*(sd[a-z0-9]+)\Z/$1/
unless(!$devices{$hctl}{dev});
$devices{$hctl}{mm} = get_line("dev");
$devices{$hctl}{sg_mm} = get_line("generic", "dev");
$devices{$hctl}{mp_dev} = glob_last("holders", "dm*");
$devices{$hctl}{mp_dev} =~ s/.*\/(.+)\Z/$1/
unless (!$devices{$hctl}{mp_dev});