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
95af254928
133 files changed
+4222
-1605
No files matched your search
@@ -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>
|
||||
@@ -145,7 +143,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)))
|
||||
@@ -238,15 +237,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)
|
||||
@@ -258,9 +255,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