]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
homework,repart: turn on cryptsetup logging before we have a context
authorLennart Poettering <lennart@poettering.net>
Thu, 28 Oct 2021 17:06:52 +0000 (19:06 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 29 Oct 2021 07:16:59 +0000 (09:16 +0200)
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

src/home/homework.c
src/partition/repart.c

index a5da4cf54baa6c191c6a4e438c215ca2b9620dcb..c9b1734492c2a6fca0f1dd33516332507f7b99ba 100644 (file)
@@ -1785,6 +1785,8 @@ static int run(int argc, char *argv[]) {
 
         log_setup();
 
+        cryptsetup_enable_logging(NULL);
+
         umask(0022);
 
         if (argc < 2 || argc > 3)
index f50a459c624af824f1023093a595cc844cd0b5f3..62cc8ff7ae04627c32f83cb02298d8484d866c5f 100644 (file)
@@ -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);