The update_partition call in main_prepare happens immediately after
prepare_dev but only if the data argument is a block device. There is no
reason for this separation: it is more sensible to call it from within
prepare_dev.
There is an additional test in prepare_dev that verifies partprobe won't
be called on a partition because it would not make sense.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
)
except subprocess.CalledProcessError as e:
raise Error(e)
+ update_partition(data, 'prepared')
def check_journal_reqs(args):
_, allows_journal = command([
raise Error('not a dir or block device', args.data)
prepare_lock.release() # noqa
- if stat.S_ISBLK(dmode):
- update_partition(args.data, 'prepared')
-
except Error as e:
if journal_dm_keypath:
try: