Fix --sector-size argument
This commit is contained in:
parent
b66f25dfea
commit
4e61025e99
1 changed files with 3 additions and 2 deletions
|
|
@ -117,12 +117,14 @@ TIMEZONE = pytz.timezone(cfg.main.LINUX_TIME_ZONE)
|
||||||
# Classes
|
# Classes
|
||||||
class BlockPair():
|
class BlockPair():
|
||||||
"""Object for tracking source to dest recovery data."""
|
"""Object for tracking source to dest recovery data."""
|
||||||
|
# pylint: disable=too-many-instance-attributes
|
||||||
def __init__(self, source, destination, model, working_dir):
|
def __init__(self, source, destination, model, working_dir):
|
||||||
"""Initialize BlockPair()
|
"""Initialize BlockPair()
|
||||||
|
|
||||||
NOTE: source should be a wk.hw.obj.Disk() object
|
NOTE: source should be a wk.hw.obj.Disk() object
|
||||||
and destination should be a pathlib.Path() object.
|
and destination should be a pathlib.Path() object.
|
||||||
"""
|
"""
|
||||||
|
self.sector_size = source.details.get('phy-sec', 512)
|
||||||
self.source = source.path
|
self.source = source.path
|
||||||
self.destination = destination
|
self.destination = destination
|
||||||
self.map_data = {}
|
self.map_data = {}
|
||||||
|
|
@ -1245,8 +1247,7 @@ def build_ddrescue_cmd(block_pair, pass_name, settings_menu):
|
||||||
cmd.extend(get_ddrescue_settings(settings_menu))
|
cmd.extend(get_ddrescue_settings(settings_menu))
|
||||||
|
|
||||||
# Add source physical sector size (if possible)
|
# Add source physical sector size (if possible)
|
||||||
# TODO: Fix
|
cmd.append(f'--sector-size={block_pair.sector_size}')
|
||||||
#cmd.append(f'--sector-size={block_pair.source.details.get("phy-sec", 512)}')
|
|
||||||
|
|
||||||
# Add block pair and map file
|
# Add block pair and map file
|
||||||
if PLATFORM == 'Darwin':
|
if PLATFORM == 'Darwin':
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue