fscrypt-crypt-util: add --block-number option
authorEric Biggers <ebiggers@google.com>
Thu, 1 Oct 2020 00:25:05 +0000 (17:25 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 11 Oct 2020 03:27:57 +0000 (11:27 +0800)
commit300cd3558f4307b1a9b5af10e910a87e6a41481c
treed3a4ecb02850494b6b9ee24f4a74b28ec0e74b9d
parent65cd8e8a8e815aab7285c794a3431247bfb1d2bd
fscrypt-crypt-util: add --block-number option

Currently fscrypt-crypt-util assumes that the number of the first block
encrypted/decrypted is 0.  I.e., it replicates either contents
encryption from the start of a file, or encryption of a filename.

However, to easily test compression+encryption on f2fs, we need the
ability to specify a different starting block number.

Add a --block-number option which does this.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Daeho Jeong <daeho43@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/fscrypt-crypt-util.c