Skip to content

Commit

Permalink
test: do not stop after first file test or closing bracket
Browse files Browse the repository at this point in the history
Closes: 44115
  • Loading branch information
arvidjaar committed Jan 30, 2015
1 parent 2da4171 commit d29259b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions grub-core/commands/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,15 @@ test_parse (char **args, int *argn, int argc)
get_fileinfo (args[*argn + 1], &ctx);
update_val (ctx.file_exists && ctx.file_info.dir, &ctx);
(*argn) += 2;
return ctx.or || ctx.and;
continue;
}

if (grub_strcmp (args[*argn], "-e") == 0)
{
get_fileinfo (args[*argn + 1], &ctx);
update_val (ctx.file_exists, &ctx);
(*argn) += 2;
return ctx.or || ctx.and;
continue;
}

if (grub_strcmp (args[*argn], "-f") == 0)
Expand All @@ -349,7 +349,7 @@ test_parse (char **args, int *argn, int argc)
/* FIXME: check for other types. */
update_val (ctx.file_exists && ! ctx.file_info.dir, &ctx);
(*argn) += 2;
return ctx.or || ctx.and;
continue;
}

if (grub_strcmp (args[*argn], "-s") == 0)
Expand All @@ -362,7 +362,7 @@ test_parse (char **args, int *argn, int argc)
grub_file_close (file);
grub_errno = GRUB_ERR_NONE;
(*argn) += 2;
return ctx.or || ctx.and;
continue;
}

/* String tests. */
Expand All @@ -387,7 +387,7 @@ test_parse (char **args, int *argn, int argc)
if (grub_strcmp (args[*argn], ")") == 0)
{
(*argn)++;
return ctx.or || ctx.and;
continue;
}
/* Recursively invoke if parenthesis. */
if (grub_strcmp (args[*argn], "(") == 0)
Expand Down

0 comments on commit d29259b

Please sign in to comment.