From 73dee610b1b41034585321064e8158a246886f0b Mon Sep 17 00:00:00 2001 From: Glenn Washburn Date: Mon, 17 Nov 2025 00:53:08 -0600 Subject: [PATCH] util/grub-mkrescue: Fix copy/paste issue referencing mdadm The check_xorriso() function appears to have been copy/pasted from somewhere that was originally checking the mdadm command. So the file handle to the output of the xorriso command is named "mdadm". Instead rename it to the more generic "fout". Also change a comment referencing mdadm to reference xorriso. Signed-off-by: Glenn Washburn Reviewed-by: Sudhakar Kuppusamy Reviewed-by: Daniel Kiper --- util/grub-mkrescue.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c index 6dc71a8a1..951b17b8e 100644 --- a/util/grub-mkrescue.c +++ b/util/grub-mkrescue.c @@ -339,7 +339,7 @@ check_xorriso (const char *val) const char *argv[5]; int fd; pid_t pid; - FILE *mdadm; + FILE *fout; char *buf = NULL; size_t len = 0; int ret = 0; @@ -356,12 +356,12 @@ check_xorriso (const char *val) if (!pid) return 0; - /* Parent. Read mdadm's output. */ - mdadm = fdopen (fd, "r"); - if (! mdadm) + /* Parent. Read xorriso's output. */ + fout = fdopen (fd, "r"); + if (! fout) return 0; - while (getline (&buf, &len, mdadm) > 0) + while (getline (&buf, &len, fout) > 0) { if (grub_strstr (buf, val)) ret = 1;