Convert grub-emu to argp.

* grub-core/Makefile.core.def (kernel): Add kern/emu/argp_common.c on
	emu.
	* util/argp_common.c: Rename to ...
	* grub-core/kern/emu/argp_common.c: ... this. All users updated.
	Add missing includes.
	* grub-core/kern/emu/main.c: Convert to argp.
	* po/POTFILES.in: Regenerate.
	* util/grub-install.in (usage): Make first letter lowcase in messages
	for uniformity.
	* util/grub-setup.c (options): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-25 01:15:29 +01:00
parent 1e3f8ae86f
commit 6a656b0ea5
8 changed files with 120 additions and 83 deletions

View file

@ -1,35 +0,0 @@
/* grub-setup.c - make GRUB usable */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#define _GNU_SOURCE 1
#include "progname.h"
#include <argp.h>
/* Print the version information. */
static void
print_version (FILE *stream, struct argp_state *state)
{
fprintf (stream, "%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION);
}
void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
/* Set the bug report address */
const char *argp_program_bug_address = "<"PACKAGE_BUGREPORT">";

View file

@ -103,7 +103,7 @@ usage () {
printf " --grub-mkimage=%-9s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-mkimage")"
printf " --grub-mkrelpath=%-7s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-mkrelpath")"
printf " --grub-probe=%-11s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-probe")"
printf " --allow-floppy %s\n" "$(gettext "Make the drive also bootable as floppy (default for fdX devices). May break on some BIOSes.")"
printf " --allow-floppy %s\n" "$(gettext "make the drive also bootable as floppy (default for fdX devices). May break on some BIOSes.")"
printf " --recheck %s\n" "$(gettext "delete device map if it already exists")"
printf " --force %s\n" "$(gettext "install even if problems are detected")"
if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then

View file

@ -742,20 +742,20 @@ unable_to_embed:
static struct argp_option options[] = {
{"boot-image", 'b', N_("FILE"), 0,
N_("Use FILE as the boot image [default=%s]"), 0},
N_("use FILE as the boot image [default=%s]"), 0},
{"core-image", 'c', N_("FILE"), 0,
N_("Use FILE as the core image [default=%s]"), 0},
N_("use FILE as the core image [default=%s]"), 0},
{"directory", 'd', N_("DIR"), 0,
N_("Use GRUB files in the directory DIR [default=%s]"), 0},
N_("use GRUB files in the directory DIR [default=%s]"), 0},
{"device-map", 'm', N_("FILE"), 0,
N_("use FILE as the device map [default=%s]"), 0},
{"force", 'f', 0, 0,
N_("install even if problems are detected"), 0},
{"skip-fs-probe",'s',0, 0,
N_("Do not probe for filesystems in DEVICE"), 0},
N_("do not probe for filesystems in DEVICE"), 0},
{"verbose", 'v', 0, 0, N_("print verbose messages."), 0},
{"allow-floppy", 'a', 0, 0,
N_("Make the drive also bootable as floppy (default for fdX devices). May break on some BIOSes."), 0},
N_("make the drive also bootable as floppy (default for fdX devices). May break on some BIOSes."), 0},
{ 0, 0, 0, 0, 0, 0 }
};