From: Lennart Poettering Date: Thu, 31 Mar 2022 09:20:25 +0000 (+0200) Subject: integritysetup: log when attempted to detach already detached volume X-Git-Tag: v251-rc2~236^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b4b030044def68df1d3a9ef6966c7155808ba44;p=thirdparty%2Fsystemd.git integritysetup: log when attempted to detach already detached volume To make the tool behave more like cryptsetup/veritysetup --- 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");