several fixes in return value handling

This commit is contained in:
BVK Chaitanya 2010-01-26 12:32:24 +05:30
parent c1273662b9
commit 3342306cec
5 changed files with 27 additions and 15 deletions

View file

@ -412,8 +412,7 @@ grub_cmd_test (grub_command_t cmd __attribute__ ((unused)),
if (argc >= 1 && grub_strcmp (args[argc - 1], "]") == 0)
argc--;
return test_parse (args, &argn, argc) ? GRUB_ERR_NONE
: grub_error (GRUB_ERR_TEST_FAILURE, "false");
return test_parse (args, &argn, argc) ? 0 : 1;
}
static grub_command_t cmd_1, cmd_2;

View file

@ -34,7 +34,7 @@ grub_cmd_false (struct grub_command *cmd __attribute__ ((unused)),
int argc __attribute__ ((unused)),
char *argv[] __attribute__ ((unused)))
{
return grub_error (GRUB_ERR_TEST_FAILURE, "false");
return 1;
}
static grub_command_t cmd_true, cmd_false;