[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] loader/linux: Only emit newc directory once
From: |
Daniel Kiper |
Subject: |
Re: [PATCH] loader/linux: Only emit newc directory once |
Date: |
Wed, 28 Jun 2023 14:44:19 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Wed, Jun 28, 2023 at 02:25:16AM -0500, Glenn Washburn wrote:
> When creating at runtime a newc initrd via arguments to initrd with "newc:"
> prefixes, only emit a directory path record once. The original code
> intended to do that by bailing out of emiting the record when the record
> to be created matches an existing record. However, this does not happen
> because grub_memcmp() is improperly checked.
>
> Generating duplicate newc directory records does not cause any problems
> because the linux unpacker will skip it once it sees the directory already
> exists. This fix saves a little processing and makes the generated newc
> cpio archive a little smaller.
>
> Fixes: 92750e4c60 (Add ability to generate newc additions on runtime.)
> Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel