2009-11-26 Robert Millan <rmh.grub@aybabtu.com>
* conf/common.rmk (sbin_UTILITIES): Add `grub-mkdevicemap'. (grub_mkdevicemap_SOURCES): New variable. (grub_probe_SOURCES, grub_fstest_SOURCES, grub_mkfont_SOURCES) (grub_mkrelpath_SOURCES, grub_editenv_SOURCES) (grub_pe2elf_SOURCES): Add `gnulib/progname.c'. * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-mkdevicemap'. (grub_mkdevicemap_SOURCES): Remove. * conf/i386-efi.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise. * conf/i386-pc.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. * conf/sparc64-ieee1275.rmk: Likewise. * conf/x86_64-efi.rmk: Likewise. * util/elf/grub-mkimage.c: Include `<grub/i18n.h>' and `"progname.h"'. (usage): Fix strings to use `program_name'. (main): Initialize gettext. * util/grub-editenv.c: Likewise. * util/grub-emu.c: Likewise. * util/grub-fstest.c: Likewise. * util/grub-mkdevicemap.c: Likewise. * util/grub-mkfont.c: Likewise. * util/grub-mkrelpath.c: Likewise. * util/grub-pe2elf.c: Likewise. * util/grub-probe.c: Likewise. * util/sparc64/ieee1275/grub-mkimage.c: Likewise. * util/sparc64/ieee1275/grub-ofpathname.c: Likewise. * util/sparc64/ieee1275/grub-setup.c: Likewise. * util/misc.c: Include `"progname.h"'. (progname): Remove variable. (grub_util_warn, grub_util_info, grub_util_error): Use `program_name'.
This commit is contained in:
parent
6f61ed5513
commit
8a4c07fd6a
25 changed files with 750 additions and 179 deletions
|
@ -1,7 +1,7 @@
|
|||
/* grub-fstest.c - debug tool for filesystem driver */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2008,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -31,6 +31,7 @@
|
|||
#include <grub/lib/hexdump.h>
|
||||
#include <grub/lib/crc.h>
|
||||
#include <grub/command.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
#include <grub_fstest_init.h>
|
||||
|
||||
|
@ -40,6 +41,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "progname.h"
|
||||
|
||||
void
|
||||
grub_putchar (int c)
|
||||
{
|
||||
|
@ -346,10 +349,10 @@ static void
|
|||
usage (int status)
|
||||
{
|
||||
if (status)
|
||||
fprintf (stderr, "Try ``grub-fstest --help'' for more information.\n");
|
||||
fprintf (stderr, "Try ``%s --help'' for more information.\n", program_name);
|
||||
else
|
||||
printf ("\
|
||||
Usage: grub-fstest [OPTION]... IMAGE_PATH COMMANDS\n\
|
||||
Usage: %s [OPTION]... IMAGE_PATH COMMANDS\n\
|
||||
\n\
|
||||
Debug tool for filesystem driver.\n\
|
||||
\nCommands:\n\
|
||||
|
@ -369,7 +372,7 @@ Debug tool for filesystem driver.\n\
|
|||
-V, --version print version information and exit\n\
|
||||
-v, --verbose print verbose messages\n\
|
||||
\n\
|
||||
Report bugs to <%s>.\n", PACKAGE_BUGREPORT);
|
||||
Report bugs to <%s>.\n", program_name, PACKAGE_BUGREPORT);
|
||||
|
||||
exit (status);
|
||||
}
|
||||
|
@ -377,10 +380,13 @@ Report bugs to <%s>.\n", PACKAGE_BUGREPORT);
|
|||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
char *debug_str = 0, *root = 0, *default_root, *alloc_root;
|
||||
char *debug_str = NULL, *root = NULL, *default_root, *alloc_root;
|
||||
int i, cmd, num_opts, image_index, num_disks = 1;
|
||||
|
||||
progname = "grub-fstest";
|
||||
set_program_name (argv[0]);
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
/* Find the first non option entry. */
|
||||
for (num_opts = 1; num_opts < argc; num_opts++)
|
||||
|
@ -442,7 +448,7 @@ main (int argc, char *argv[])
|
|||
break;
|
||||
|
||||
case 'V':
|
||||
printf ("%s (%s) %s\n", progname, PACKAGE_NAME, PACKAGE_VERSION);
|
||||
printf ("%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION);
|
||||
return 0;
|
||||
|
||||
case 'v':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue