* util/grub-script-check.c (main): Print script line number on
error.
This commit is contained in:
commit
bddc3ef623
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-12-03 BVK Chaitanya <bvk.groups@gmail.com>
|
||||
|
||||
* util/grub-script-check.c (main): Print script line number on
|
||||
error.
|
||||
|
||||
2010-12-01 Robert Millan <rmh@gnu.org>
|
||||
|
||||
* grub-core/fs/zfs/zfs.c: New file.
|
||||
|
|
|
@ -73,6 +73,7 @@ main (int argc, char *argv[])
|
|||
{
|
||||
char *argument;
|
||||
char *input;
|
||||
int lineno = 0;
|
||||
FILE *file = 0;
|
||||
int verbose = 0;
|
||||
int found_input = 0;
|
||||
|
@ -111,6 +112,7 @@ main (int argc, char *argv[])
|
|||
cmdline[i] = '\0';
|
||||
}
|
||||
|
||||
lineno++;
|
||||
*line = grub_strdup (cmdline);
|
||||
|
||||
free (cmdline);
|
||||
|
@ -189,5 +191,11 @@ main (int argc, char *argv[])
|
|||
|
||||
if (file) fclose (file);
|
||||
|
||||
return (found_input && script == 0);
|
||||
if (found_input && script == 0)
|
||||
{
|
||||
fprintf (stderr, "error: line no: %u\n", lineno);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue