avbtool: Use 'restart_on_corruption' when setting up dm-verity.
This is needed for the AVB error handler in the kernel which will only
be invoked when this option is used.
Bug: None
Test: Unit tests pass.
Change-Id: Id6ba4562ca973df2ef0425484eb9f1df22f2d7d0
diff --git a/avbtool b/avbtool
index f467c70..3da0279 100755
--- a/avbtool
+++ b/avbtool
@@ -1815,7 +1815,8 @@
c += ' {}'.format(str(ht.root_digest).encode('hex')) # root_digest
c += ' {}'.format(str(ht.salt).encode('hex')) # salt
if ht.fec_num_roots > 0:
- c += ' 9' # number of optional args
+ c += ' 10' # number of optional args
+ c += ' restart_on_corruption'
c += ' ignore_zero_blocks'
c += ' use_fec_from_device PARTUUID=$(ANDROID_SYSTEM_PARTUUID)'
c += ' fec_roots {}'.format(ht.fec_num_roots)
@@ -1825,7 +1826,8 @@
c += ' fec_blocks {}'.format(ht.fec_offset/ht.data_block_size)
c += ' fec_start {}'.format(ht.fec_offset/ht.data_block_size)
else:
- c += ' 1' # number of optional args
+ c += ' 2' # number of optional args
+ c += ' restart_on_corruption'
c += ' ignore_zero_blocks'
c += '" root=0xfd00'