]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
disk/lvm: Add informational messages in error cases of ignored features
authorPatrick Plenefisch <simonpatp@gmail.com>
Sun, 8 Dec 2024 02:19:23 +0000 (21:19 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 5 Mar 2025 20:28:03 +0000 (21:28 +0100)
Signed-off-by: Patrick Plenefisch <simonpatp@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/lvm.c

index 1f8e5d76d9527205e4b1152d2603b4050c1de4d1..af6a8e93cdbcc1b50cd8847394bc19d6d71a4b92 100644 (file)
@@ -829,6 +829,14 @@ grub_lvm_detect (grub_disk_t disk,
 
                      char *p2, *p3;
                      grub_size_t sz;
+#ifdef GRUB_UTIL
+                     p2 = grub_strchr (p, '"');
+                     if (p2)
+                       *p2 = '\0';
+                     grub_util_info ("Ignoring extra metadata type '%s' for %s", p, lv->name);
+                     if (p2)
+                       *p2 ='"';
+#endif
 
                      ignored_feature = grub_zalloc (sizeof (*ignored_feature));
                      if (!ignored_feature)
@@ -909,7 +917,7 @@ grub_lvm_detect (grub_disk_t disk,
                      char *p2;
                      p2 = grub_strchr (p, '"');
                      if (p2)
-                       *p2 = 0;
+                       *p2 = '\0';
                      grub_util_info ("unknown LVM type %s", p);
                      if (p2)
                        *p2 ='"';
@@ -1001,6 +1009,12 @@ grub_lvm_detect (grub_disk_t disk,
                    ignored_feature->lv = NULL;
                  }
              }
+                 else
+                 {
+#ifdef GRUB_UTIL
+                     grub_util_info ("Couldn't find LVM part of ignored feature on %s", ignored_feature->origin);
+#endif
+                 }
          }
       }