The current logic makes it report only the first
partitions of devices.
Fixes: https://tracker.ceph.com/issues/63086
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit
b14ff07e6344d9f097259265d468f6300818b053)
result = dict()
for device in devices:
device_path = os.path.join(_sys_dev_block_path, device)
- is_partition = get_file_contents(os.path.join(device_path, 'partition')) == "1"
+ is_partition = int(get_file_contents(os.path.join(device_path, 'partition'), '0')) > 0
if not is_partition:
continue