From 2b4b030044def68df1d3a9ef6966c7155808ba44 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 31 Mar 2022 11:20:25 +0200 Subject: [PATCH] integritysetup: log when attempted to detach already detached volume To make the tool behave more like cryptsetup/veritysetup --- src/integritysetup/integritysetup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/integritysetup/integritysetup.c b/src/integritysetup/integritysetup.c index eeb5cdbdbb3..5fd220c515d 100644 --- a/src/integritysetup/integritysetup.c +++ b/src/integritysetup/integritysetup.c @@ -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"); -- 2.47.3