]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
util/grub-mkrescue: Fix copy/paste issue referencing mdadm
authorGlenn Washburn <development@efficientek.com>
Mon, 17 Nov 2025 06:53:08 +0000 (00:53 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 18 Nov 2025 11:49:31 +0000 (12:49 +0100)
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 <development@efficientek.com>
Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub-mkrescue.c

index 6dc71a8a162872cdb9d20a124a19915f752fd9ef..951b17b8edb9e6d11f9384b1d67a6f262f59e939 100644 (file)
@@ -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;