mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 16:49:23 +00:00
merge with mainline
This commit is contained in:
commit
49e38cf475
227 files changed
+8548
-14999
No files matched your search
+16
-12
@@ -26,8 +26,6 @@
|
||||
#include <grub/parser.h>
|
||||
#include <grub/script_sh.h>
|
||||
|
||||
#include <grub_script_check_init.h>
|
||||
|
||||
#define _GNU_SOURCE 1
|
||||
|
||||
#include <ctype.h>
|
||||
@@ -58,13 +56,22 @@ grub_refresh (void)
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_script_cmd_shift (grub_command_t cmd __attribute__((unused)),
|
||||
int argc __attribute__((unused)),
|
||||
char *argv[] __attribute__((unused)))
|
||||
grub_script_break (grub_command_t cmd __attribute__((unused)),
|
||||
int argc __attribute__((unused)),
|
||||
char *argv[] __attribute__((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_script_shift (grub_command_t cmd __attribute__((unused)),
|
||||
int argc __attribute__((unused)),
|
||||
char *argv[] __attribute__((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
grub_script_execute_argument_to_string (struct grub_script_arg *arg __attribute__ ((unused)))
|
||||
{
|
||||
@@ -153,7 +160,8 @@ main (int argc, char *argv[])
|
||||
char *input;
|
||||
FILE *file = 0;
|
||||
int verbose = 0;
|
||||
struct grub_script *script;
|
||||
int found_input = 0;
|
||||
struct grub_script *script = NULL;
|
||||
|
||||
auto grub_err_t get_config_line (char **line, int cont);
|
||||
grub_err_t get_config_line (char **line, int cont __attribute__ ((unused)))
|
||||
@@ -246,15 +254,13 @@ main (int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize all modules. */
|
||||
grub_init_all ();
|
||||
|
||||
do
|
||||
{
|
||||
input = 0;
|
||||
get_config_line(&input, 0);
|
||||
if (! input)
|
||||
break;
|
||||
found_input = 1;
|
||||
|
||||
script = grub_script_parse (input, get_config_line);
|
||||
if (script)
|
||||
@@ -266,9 +272,7 @@ main (int argc, char *argv[])
|
||||
grub_free (input);
|
||||
} while (script != 0);
|
||||
|
||||
/* Free resources. */
|
||||
grub_fini_all ();
|
||||
if (file) fclose (file);
|
||||
|
||||
return (script == 0);
|
||||
return (found_input && script == 0);
|
||||
}
|
||||
Reference in new issue
Block a user