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 <development@efficientek.com> Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
72b4c99376
commit
73dee610b1
@ -339,7 +339,7 @@ check_xorriso (const char *val)
|
|||||||
const char *argv[5];
|
const char *argv[5];
|
||||||
int fd;
|
int fd;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
FILE *mdadm;
|
FILE *fout;
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -356,12 +356,12 @@ check_xorriso (const char *val)
|
|||||||
if (!pid)
|
if (!pid)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Parent. Read mdadm's output. */
|
/* Parent. Read xorriso's output. */
|
||||||
mdadm = fdopen (fd, "r");
|
fout = fdopen (fd, "r");
|
||||||
if (! mdadm)
|
if (! fout)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
while (getline (&buf, &len, mdadm) > 0)
|
while (getline (&buf, &len, fout) > 0)
|
||||||
{
|
{
|
||||||
if (grub_strstr (buf, val))
|
if (grub_strstr (buf, val))
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user