From 46c291835ff3678c4b15facdeffae5b433e80dd6 Mon Sep 17 00:00:00 2001 From: Fedor Loshakov Date: Thu, 9 Mar 2023 13:51:20 +0100 Subject: [PATCH] ziomon/ziorep_config: fix missing SG major:minor for disk block devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Suggested-by: Steffen Maier Reviewed-by: Benjamin Block Reviewed-by: Steffen Maier Signed-off-by: Jan Höppner --- ziomon/ziorep_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ziomon/ziorep_config b/ziomon/ziorep_config index 6d2ffe94..abf3865d 100755 --- a/ziomon/ziorep_config +++ b/ziomon/ziorep_config @@ -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});