~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to util/misc.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Evan Broder, Mario Limonciello
  • Date: 2010-11-24 13:59:55 UTC
  • mfrom: (1.17.6 upstream) (17.6.15 experimental)
  • Revision ID: james.westby@ubuntu.com-20101124135955-r6ii5sepayr7jt53
Tags: 1.99~20101124-1ubuntu1
[ Colin Watson ]
* Resynchronise with Debian experimental.  Remaining changes:
  - Adjust for default Ubuntu boot options ("quiet splash").
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Set a monochromatic theme for Ubuntu.
  - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
    recovery mode, quiet option, tweak how memtest86+ is displayed, and
    use UUIDs where appropriate.
  - Fix backslash-escaping in merge_debconf_into_conf.
  - Remove "GNU/Linux" from default distributor string.
  - Add crashkernel= options if kdump and makedumpfile are available.
  - If other operating systems are installed, then automatically unhide
    the menu.  Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus
    if available to check whether Shift is pressed.  If it is, show the
    menu, otherwise boot immediately.  If keystatus is not available, then
    fall back to a short delay interruptible with Escape.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Don't display introductory message about line editing unless we're
    actually offering a shell prompt.  Don't clear the screen just before
    booting if we never drew the menu in the first place.
  - Remove some verbose messages printed before reading the configuration
    file.
  - Suppress progress messages as the kernel and initrd load for
    non-recovery kernel menu entries.
  - Change prepare_grub_to_access_device to handle filesystems
    loop-mounted on file images.
  - Ignore devices loop-mounted from files in 10_linux.
  - Show the boot menu if the previous boot failed, that is if it failed
    to get to the end of one of the normal runlevels.
  - Don't generate /boot/grub/device.map during grub-install or
    grub-mkconfig by default.
  - Adjust upgrade version checks for Ubuntu.
  - Don't display "GRUB loading" unless Shift is held down.
  - Adjust versions of grub-doc and grub-legacy-doc conflicts to tolerate
    our backport of the grub-doc split.
  - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
  - Look for .mo files in /usr/share/locale-langpack as well, in
    preference.
  - Make sure GRUB_TIMEOUT isn't quoted unnecessarily.
  - Probe all devices in 'grub-probe --target=drive' if
    /boot/grub/device.map is missing.
  - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
  - Use qemu rather than qemu-system-i386.
  - Program vesafb on BIOS systems rather than efifb.
  - Add a grub-rescue-efi-amd64 package containing a rescue CD-ROM image
    for EFI-AMD64.
  - On Wubi, don't ask for an install device, but just update wubildr
    using the diverted grub-install.
  - When embedding the core image in a post-MBR gap, check for and avoid
    sectors matching any of a list of known signatures.
  - Disable video_bochs and video_cirrus on PC BIOS systems, as probing
    PCI space seems to break on some systems.
* Downgrade "ACPI shutdown failed" error to a debug message, since it can
  cause spurious test failures.

[ Evan Broder ]
* Enable lua from grub-extras.
* Incorporate the bitop library into lua.
* Add enum_pci function to grub module in lua.
* Switch back to gfxpayload=keep by default, unless the video hardware
  is known to not support it.

[ Mario Limonciello ]
* Built part_msdos and vfat into bootx64.efi (LP: #677758)

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include <grub/dl.h>
36
36
#include <grub/misc.h>
37
37
#include <grub/cache.h>
 
38
#include <grub/emu/misc.h>
38
39
#include <grub/util/misc.h>
39
40
#include <grub/mm.h>
40
41
#include <grub/term.h>
41
42
#include <grub/time.h>
42
43
#include <grub/i18n.h>
 
44
#include <grub/script_sh.h>
43
45
 
44
46
#define ENABLE_RELOCATABLE 0
45
47
#include "progname.h"
178
180
    grub_util_error ("write failed");
179
181
}
180
182
 
 
183
char *
 
184
grub_script_execute_argument_to_string (struct grub_script_arg *arg __attribute__ ((unused)))
 
185
{
 
186
  return 0;
 
187
}
 
188
 
 
189
grub_err_t
 
190
grub_script_execute_cmdline (struct grub_script_cmd *cmd __attribute__ ((unused)))
 
191
{
 
192
  return 0;
 
193
}
 
194
 
 
195
grub_err_t
 
196
grub_script_execute_cmdlist (struct grub_script_cmd *cmd __attribute__ ((unused)))
 
197
{
 
198
  return 0;
 
199
}
 
200
 
 
201
grub_err_t
 
202
grub_script_execute_cmdif (struct grub_script_cmd *cmd __attribute__ ((unused)))
 
203
{
 
204
  return 0;
 
205
}
 
206
 
 
207
grub_err_t
 
208
grub_script_execute_cmdfor (struct grub_script_cmd *cmd __attribute__ ((unused)))
 
209
{
 
210
  return 0;
 
211
}
 
212
 
 
213
grub_err_t
 
214
grub_script_execute_cmdwhile (struct grub_script_cmd *cmd __attribute__ ((unused)))
 
215
{
 
216
  return 0;
 
217
}
 
218
 
 
219
grub_err_t
 
220
grub_script_execute_menuentry (struct grub_script_cmd *cmd __attribute__ ((unused)))
 
221
{
 
222
  return 0;
 
223
}
 
224
 
 
225
grub_err_t
 
226
grub_script_execute (struct grub_script *script)
 
227
{
 
228
  if (script == 0 || script->cmd == 0)
 
229
    return 0;
 
230
 
 
231
  return script->cmd->exec (script->cmd);
 
232
}
 
233
 
 
234
void
 
235
grub_putchar (int c)
 
236
{
 
237
  putchar (c);
 
238
}
 
239
 
 
240
int
 
241
grub_getkey (void)
 
242
{
 
243
  return -1;
 
244
}
 
245
 
 
246
void
 
247
grub_refresh (void)
 
248
{
 
249
  fflush (stdout);
 
250
}
 
251
 
 
252
static void
 
253
grub_xputs_real (const char *str)
 
254
{
 
255
  fputs (str, stdout);
 
256
}
 
257
 
 
258
void (*grub_xputs) (const char *str) = grub_xputs_real;
 
259
 
 
260
int
 
261
grub_dl_ref (grub_dl_t mod)
 
262
{
 
263
  (void) mod;
 
264
  return 0;
 
265
}
 
266
 
 
267
int
 
268
grub_dl_unref (grub_dl_t mod)
 
269
{
 
270
  (void) mod;
 
271
  return 0;
 
272
}
 
273
 
181
274
/* Some functions that we don't use.  */
182
275
void
183
276
grub_mm_init_region (void *addr __attribute__ ((unused)),
185
278
{
186
279
}
187
280
 
188
 
#if GRUB_NO_MODULES
189
281
void
190
282
grub_register_exported_symbols (void)
191
283
{
192
284
}
193
 
#endif
194
285
 
195
286
#ifdef __MINGW32__
196
287
 
214
305
 
215
306
#endif
216
307
 
217
 
#if !(defined (__i386__) || defined (__x86_64__)) && GRUB_NO_MODULES
218
 
void
219
 
grub_arch_sync_caches (void *address __attribute__ ((unused)),
220
 
                       grub_size_t len __attribute__ ((unused)))
221
 
{
222
 
}
223
 
#endif
224
 
 
225
308
#ifdef __MINGW32__
226
309
 
227
310
void sync (void)
293
376
  textdomain (PACKAGE);
294
377
#endif /* (defined(ENABLE_NLS) && ENABLE_NLS) */
295
378
}
296
 
 
297
 
#endif /* GRUB_UTIL */
298
 
 
299
 
int
300
 
grub_dl_ref (grub_dl_t mod)
301
 
{
302
 
  (void) mod;
303
 
  return 0;
304
 
}
305
 
 
306
 
int
307
 
grub_dl_unref (grub_dl_t mod)
308
 
{
309
 
  (void) mod;
310
 
  return 0;
311
 
}
 
379
#endif