grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/6 v12] lvm: add informational messages in error cases of ig


From: Daniel Kiper
Subject: Re: [PATCH 5/6 v12] lvm: add informational messages in error cases of ignored features
Date: Mon, 16 Dec 2024 17:41:00 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Sat, Dec 07, 2024 at 09:39:41PM -0500, Patrick Plenefisch wrote:
> This patch contains a change requested by Daniel Kiper to use
> a null character instead of an integer zero to terminate strings

The commit message does not seem to entirely reflect what is happening
in the patch itself. Please fix it.

> Signed-off-by: Patrick Plenefisch <simonpatp@gmail.com>
> ---
>  grub-core/disk/lvm.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c
> index 9c9386751..abb5b12ae 100644
> --- a/grub-core/disk/lvm.c
> +++ b/grub-core/disk/lvm.c
> @@ -818,6 +818,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)
> @@ -898,7 +906,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 ='"';
> @@ -990,6 +998,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
> +          }
>        }
>        }

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]