Added missing fallback from physical_block_size to hw_sector_size in sectorsize fact discovery for kernels older than May 2009.
References #5761
This commit is contained in:
parent
3fb3e7e6dc
commit
df3188cef0
1 changed files with 4 additions and 2 deletions
|
@ -739,7 +739,9 @@ class LinuxHardware(Hardware):
|
|||
|
||||
part['start'] = get_file_content(part_sysdir + "/start",0)
|
||||
part['sectors'] = get_file_content(part_sysdir + "/size",0)
|
||||
part['sectorsize'] = get_file_content(part_sysdir + "/queue/physical_block_size",512)
|
||||
part['sectorsize'] = get_file_content(part_sysdir + "/queue/physical_block_size")
|
||||
if not part['sectorsize']:
|
||||
part['sectorsize'] = get_file_content(part_sysdir + "/queue/hw_sector_size",512)
|
||||
part['size'] = module.pretty_bytes((float(part['sectors']) * float(part['sectorsize'])))
|
||||
d['partitions'][partname] = part
|
||||
|
||||
|
@ -756,7 +758,7 @@ class LinuxHardware(Hardware):
|
|||
d['sectors'] = 0
|
||||
d['sectorsize'] = get_file_content(sysdir + "/queue/physical_block_size")
|
||||
if not d['sectorsize']:
|
||||
d['sectorsize'] = 512
|
||||
d['sectorsize'] = get_file_content(sysdir + "/queue/hw_sector_size",512)
|
||||
d['size'] = module.pretty_bytes(float(d['sectors']) * float(d['sectorsize']))
|
||||
|
||||
d['host'] = ""
|
||||
|
|
Loading…
Reference in a new issue