Implement active device suspend info.

Add CRYPT_ACTIVATE_SUSPENDED bit to crypt_get_active_device() flags
that informs the caller that device is suspended (luksSuspend).

Fixes: #501.
This commit is contained in:
Milan Broz
2019-11-24 16:19:45 +01:00
parent 684f43d84d
commit 2746fd708f
7 changed files with 23 additions and 2 deletions

View File

@@ -744,8 +744,9 @@ static int action_status(void)
log_std(" size: %" PRIu64 " sectors\n", cad.size);
if (cad.iv_offset)
log_std(" skipped: %" PRIu64 " sectors\n", cad.iv_offset);
log_std(" mode: %s\n", cad.flags & CRYPT_ACTIVATE_READONLY ?
"readonly" : "read/write");
log_std(" mode: %s%s\n", cad.flags & CRYPT_ACTIVATE_READONLY ?
"readonly" : "read/write",
(cad.flags & CRYPT_ACTIVATE_SUSPENDED) ? " (suspended)" : "");
if (cad.flags & (CRYPT_ACTIVATE_ALLOW_DISCARDS|
CRYPT_ACTIVATE_SAME_CPU_CRYPT|
CRYPT_ACTIVATE_SUBMIT_FROM_CRYPT_CPUS))