merge from trunk

This commit is contained in:
Colin Watson 2009-12-08 00:55:17 +00:00
commit e8b2988803
108 changed files with 3024 additions and 5764 deletions

View file

@ -21,6 +21,7 @@
#include <grub/machine/boot.h>
#include <grub/machine/kernel.h>
#include <grub/kernel.h>
#include <grub/i18n.h>
#include <grub/disk.h>
#include <grub/util/misc.h>
#include <grub/util/resolve.h>
@ -34,6 +35,8 @@
#define _GNU_SOURCE 1
#include <getopt.h>
#include "progname.h"
static void
compress_kernel (char *kernel_img, size_t kernel_size,
char **core_img, size_t *core_size)
@ -188,10 +191,10 @@ static void
usage (int status)
{
if (status)
fprintf (stderr, "Try ``grub-mkimage --help'' for more information.\n");
fprintf (stderr, "Try ``%s --help'' for more information.\n", program_name);
else
printf ("\
Usage: grub-mkimage [OPTION]... [MODULES]\n\
Usage: %s [OPTION]... [MODULES]\n\
\n\
Make a bootable image of GRUB.\n\
\n\
@ -204,7 +207,7 @@ Make a bootable image of GRUB.\n\
-v, --verbose print verbose messages\n\
\n\
Report bugs to <%s>.\n\
", GRUB_LIBDIR, DEFAULT_DIRECTORY, PACKAGE_BUGREPORT);
", program_name, GRUB_LIBDIR, DEFAULT_DIRECTORY, PACKAGE_BUGREPORT);
exit (status);
}
@ -218,7 +221,11 @@ main (int argc, char *argv[])
char *memdisk = NULL;
FILE *fp = stdout;
progname = "grub-mkimage";
set_program_name (argv[0]);
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
while (1)
{
int c = getopt_long (argc, argv, "d:p:m:o:hVv", options, 0);

View file

@ -20,15 +20,22 @@
#include <grub/util/misc.h>
#include <grub/util/ofpath.h>
#include <grub/i18n.h>
#include "progname.h"
int main(int argc, char **argv)
{
char *of_path;
progname = "grub-ofpathname";
set_program_name (argv[0]);
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
if (argc != 2)
{
printf("Usage: grub-ofpathname DEVICE\n");
printf("Usage: %s DEVICE\n", program_name);
return 1;
}

View file

@ -21,6 +21,7 @@
#include <grub/types.h>
#include <grub/util/misc.h>
#include <grub/device.h>
#include <grub/i18n.h>
#include <grub/disk.h>
#include <grub/file.h>
#include <grub/fs.h>
@ -49,6 +50,8 @@
#define _GNU_SOURCE 1
#include <getopt.h>
#include "progname.h"
/* This program fills in various fields inside of the 'boot' and 'core'
* image files.
*
@ -401,10 +404,10 @@ static void
usage (int status)
{
if (status)
fprintf (stderr, "Try ``grub-setup --help'' for more information.\n");
fprintf (stderr, "Try ``%s --help'' for more information.\n", program_name);
else
printf ("\
Usage: grub-setup [OPTION]... DEVICE\n\
Usage: %s [OPTION]... DEVICE\n\
\n\
Set up images to boot from DEVICE.\n\
DEVICE must be a GRUB device (e.g. ``(hd0,1)'').\n\
@ -419,7 +422,7 @@ DEVICE must be a GRUB device (e.g. ``(hd0,1)'').\n\
-v, --verbose print verbose messages\n\
\n\
Report bugs to <%s>.\n\
",
", program_name,
DEFAULT_BOOT_FILE, DEFAULT_CORE_FILE, DEFAULT_DIRECTORY,
DEFAULT_DEVICE_MAP, PACKAGE_BUGREPORT);
@ -616,7 +619,10 @@ main (int argc, char *argv[])
{
struct grub_setup_info ginfo;
progname = "grub-setup";
set_program_name (argv[0]);
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
init_info (&ginfo);
if (!parse_options (&ginfo, argc, argv))