~madengineer10/ubuntu/trusty/grub/linux-pref-substr

« back to all changes in this revision

Viewing changes to util/grub-script-check.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson, Colin Watson, Harald Sitter
  • Date: 2013-07-13 17:08:01 UTC
  • mfrom: (17.3.85 sid)
  • Revision ID: package-import@ubuntu.com-20130713170801-zwr19vwygurthy3v
Tags: 2.00-15ubuntu1
[ Colin Watson ]
* Resynchronise with Debian.  Remaining changes:
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Add crashkernel option.
  - Bypass menu unless other OSes are installed or Shift is pressed.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Reduce visual clutter in normal mode.
  - Remove verbose messages printed before reading configuration.
  - Suppress kernel/initrd progress messages, except in recovery mode.
  - Show the boot menu if the previous boot failed.
  - Suppress "GRUB loading" message unless Shift is held down.
  - Check hardware support before using gfxpayload=keep.
  - Set vt.handoff=7 for smooth handoff to kernel graphical mode.
  - In recovery mode, add nomodeset to the Linux kernel arguments, and
    remove the 'set gfxpayload=keep' command.
  - Skip Windows os-prober entries on Wubi systems, and suppress the menu
    by default if those are the only other-OS entries.
  - Handle probing striped DM-RAID devices.
  - Disable cursor as early as possible in grub_main.
  - Treat Kubuntu as an alias for Ubuntu in GRUB_DISTRIBUTOR.

[ Harald Sitter ]
* Update mkconfig_ubuntu_distributor.patch to handle Kubuntu like Ubuntu;
  no GNU/Linux suffix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
  int lineno = 0;
93
93
  FILE *file = 0;
94
94
  struct arguments arguments;
95
 
  int found_input = 0;
 
95
  int found_input = 0, found_cmd = 0;
96
96
  struct grub_script *script = NULL;
97
97
 
98
98
  auto grub_err_t get_config_line (char **line, int cont);
177
177
      script = grub_script_parse (input, get_config_line);
178
178
      if (script)
179
179
        {
 
180
          if (script->cmd)
 
181
            found_cmd = 1;
180
182
          grub_script_execute (script);
181
183
          grub_script_free (script);
182
184
        }
191
193
      fprintf (stderr, _("Syntax error at line %u\n"), lineno);
192
194
      return 1;
193
195
    }
 
196
  if (! found_cmd)
 
197
    {
 
198
      fprintf (stderr, _("Script contains no commands and will do nothing\n"),
 
199
               arguments.filename);
 
200
      return 1;
 
201
    }
194
202
 
195
203
  return 0;
196
204
}