integritysetup: log when attempted to detach already detached volume

To make the tool behave more like cryptsetup/veritysetup
This commit is contained in:
Lennart Poettering
2022-03-31 11:44:46 +02:00
parent 042fcbbf7e
commit 2b4b030044
+3 -1
View File
@@ -175,8 +175,10 @@ static int run(int argc, char *argv[]) {
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "detach has a maximum of two arguments.");
r = crypt_init_by_name(&cd, volume);
if (r == -ENODEV)
if (r == -ENODEV) {
log_info("Volume %s already inactive.", volume);
return 0;
}
if (r < 0)
return log_error_errno(r, "crypt_init_by_name() failed: %m");