From: Glenn Washburn <development@efficientek.com>
To: grub-devel@gnu.org, Daniel Kiper <dkiper@net-space.pl>
Cc: Gary Lin <glin@suse.com>, Glenn Washburn <development@efficientek.com>
Subject: [PATCH 3/3] loader/linux: Print debug message for each generated newc path generated
Date: Wed, 28 Jun 2023 02:38:24 -0500 [thread overview]
Message-ID: <77f50efea25c7e63c99513008748e6db2d2eb0fb.1687937299.git.development@efficientek.com> (raw)
In-Reply-To: <cover.1687937299.git.development@efficientek.com>
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
grub-core/loader/linux.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c
index cb2c3f6e4f06..35ad6bf19460 100644
--- a/grub-core/loader/linux.c
+++ b/grub-core/loader/linux.c
@@ -64,6 +64,7 @@ make_header (grub_uint8_t *ptr,
struct newc_head *head = (struct newc_head *) ptr;
grub_uint8_t *optr;
grub_size_t oh = 0;
+ grub_dprintf ("linux", "newc: Creating path '%s', mode=%s%o, size=%"PRIuGRUB_OFFSET"\n", name, (mode == 0) ? "" : "0", mode, fsize);
grub_memcpy (head->magic, "070701", 6);
set_field (head->ino, 0);
set_field (head->mode, mode);
@@ -106,6 +107,7 @@ insert_dir (const char *name, struct dir **root,
struct dir *cur, **head = root;
const char *cb, *ce = name;
*size = 0;
+
while (1)
{
for (cb = ce; *cb == '/'; cb++);
@@ -137,7 +139,6 @@ insert_dir (const char *name, struct dir **root,
grub_free (n);
return grub_errno;
}
- grub_dprintf ("linux", "Creating directory %s, %s\n", name, ce);
ptr = make_header (ptr, tmp_name, ce - name + 1,
040777, 0);
grub_free (tmp_name);
--
2.34.1
next prev parent reply other threads:[~2023-06-28 7:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 7:38 [PATCH 0/3] Improve newc generation logging Glenn Washburn
2023-06-28 7:38 ` [PATCH 1/3] misc: Support octal printf format code Glenn Washburn
2023-06-28 7:38 ` [PATCH 2/3] include/grub/types.h: Add PRI*GRUB_OFFSET and PRI*GRUB_DISK_ADDR Glenn Washburn
2023-06-28 7:38 ` Glenn Washburn [this message]
2023-06-28 12:50 ` [PATCH 0/3] Improve newc generation logging Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=77f50efea25c7e63c99513008748e6db2d2eb0fb.1687937299.git.development@efficientek.com \
--to=development@efficientek.com \
--cc=dkiper@net-space.pl \
--cc=glin@suse.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.