From: Lennart Poettering Date: Thu, 28 Oct 2021 17:06:52 +0000 (+0200) Subject: homework,repart: turn on cryptsetup logging before we have a context X-Git-Tag: v250-rc1~384 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=30f194001ff647280ad49b68597c223e57ad7f6e;p=thirdparty%2Fsystemd.git homework,repart: turn on cryptsetup logging before we have a context Otherwise we'll miss the log message from allocation of the context. We already made this change in most of our tools that interface with libcryptsetup, but we forgot two. As suggested: https://github.com/systemd/systemd/pull/21135#discussion_r738287504 --- diff --git a/src/home/homework.c b/src/home/homework.c index a5da4cf54ba..c9b1734492c 100644 --- a/src/home/homework.c +++ b/src/home/homework.c @@ -1785,6 +1785,8 @@ static int run(int argc, char *argv[]) { log_setup(); + cryptsetup_enable_logging(NULL); + umask(0022); if (argc < 2 || argc > 3) diff --git a/src/partition/repart.c b/src/partition/repart.c index f50a459c624..62cc8ff7ae0 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -4827,6 +4827,10 @@ static int run(int argc, char *argv[]) { if (r < 0) return r; +#if HAVE_LIBCRYPTSETUP + cryptsetup_enable_logging(NULL); +#endif + if (arg_image) { assert(!arg_root);