Merge bmpidx into gfxmenu
This commit is contained in:
commit
9ec25583a9
18 changed files with 752 additions and 3125 deletions
104
ChangeLog
104
ChangeLog
|
@ -1,3 +1,95 @@
|
|||
2009-11-29 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
|
||||
Fix GNU/Hurd grub-install crash.
|
||||
* util/grub-probe.c (probe): Try to access `path' only when it is not
|
||||
NULL.
|
||||
|
||||
2009-11-28 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Correct module naming.
|
||||
|
||||
* video/efi_uga.c (GRUB_MOD_INIT(efi_fb)): Renamed from this ...
|
||||
(GRUB_MOD_INIT(efi_uga)): ... to this
|
||||
(GRUB_MOD_FINI(efi_fb)): Renamed from this ...
|
||||
(GRUB_MOD_FINI(efi_uga)): ... to this
|
||||
* video/efi_gop.c (GRUB_MOD_INIT(efi_fb)): Renamed from this ...
|
||||
(GRUB_MOD_INIT(efi_gop)): ... to this
|
||||
(GRUB_MOD_FINI(efi_fb)): Renamed from this ...
|
||||
(GRUB_MOD_FINI(efi_gop)): ... to this
|
||||
|
||||
2009-11-28 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* util/mkisofs/mkisofs.c (ld_options): Mark all `arg' strings as
|
||||
translatable.
|
||||
(usage): Translate `arg' strings using gettext().
|
||||
Thanks to Jordi Mallach for the suggestion.
|
||||
|
||||
2009-11-28 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
GOP support. Based on patch from Bean
|
||||
(http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00384.html)
|
||||
|
||||
* video/efi_gop.c: New file.
|
||||
* include/grub/efi/graphics_output.h: Likewise.
|
||||
* conf/i386-efi.rmk (pkglib_MODULES): Add `efi_gop.mod'.
|
||||
(efi_fb_mod_SOURCES, efi_fb_mod_CFLAGS, efi_fb_mod_LDFLAGS): New
|
||||
variables.
|
||||
* conf/x86_64-efi.rmk: Likewise.
|
||||
|
||||
2009-11-28 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Rename efi_fb to efi_uga.
|
||||
|
||||
* conf/i386-efi.rmk (pkglib_MODULES): Rename 'efi_fb.mod' to
|
||||
'efi_uga.mod'.
|
||||
(efi_fb_mod_SOURCES): Rename this ...
|
||||
(efi_uga_mod_SOURCES): ... to this.
|
||||
(efi_fb_mod_CFLAGS): Rename this ...
|
||||
(efi_uga_mod_CFLAGS): ... to this.
|
||||
(efi_fb_mod_LDFLAGS): Rename this ...
|
||||
(efi_uga_mod_LDFLAGS): ... to this.
|
||||
* conf/x86_64-efi.rmk (pkglib_MODULES): Rename 'efi_fb.mod' to
|
||||
'efi_uga.mod'.
|
||||
(efi_fb_mod_SOURCES): Rename this ...
|
||||
(efi_uga_mod_SOURCES): ... to this.
|
||||
(efi_fb_mod_CFLAGS): Rename this ...
|
||||
(efi_uga_mod_CFLAGS): ... to this.
|
||||
(efi_fb_mod_LDFLAGS): Rename this ...
|
||||
(efi_uga_mod_LDFLAGS): ... to this.
|
||||
* video/efi_fb.c: Move this ...
|
||||
* video/efi_uga.c: ... to this. Change prefix to 'grub_video_uga_'.
|
||||
|
||||
2009-11-27 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* po/README: New file. Explain our PO file workflow.
|
||||
|
||||
2009-11-27 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* po/ChangeLog: Remove. Move relevant entries back to ...
|
||||
* ChangeLog: ... here.
|
||||
* po/ca.po: Remove (now handled by TLP).
|
||||
* po/id.po: Likewise.
|
||||
* po/zh_CN.po: Likewise.
|
||||
* Makefile.in (LINGUAS): Initialize in a way that supports
|
||||
empty set.
|
||||
|
||||
2009-11-27 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* Makefile.in (LINGUAS): Rewrite by scanning po/ directory instead of
|
||||
reliing on po/LINGUAS.
|
||||
($(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po)): Rewrite as ...
|
||||
(po/%.po): ... this.
|
||||
|
||||
2009-11-26 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* util/i386/efi/grub-mkimage.c: Include "progname.h".
|
||||
(main): Use `program_name' instead of nonexistent `progname'.
|
||||
|
||||
2009-11-26 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* conf/i386-efi.rmk (grub_mkimage_SOURCES): Add `gnulib/progname.c'.
|
||||
* conf/x86_64-efi.rmk (grub_mkimage_SOURCES): Likewise.
|
||||
|
||||
2009-11-26 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* conf/i386-coreboot.rmk: Cleanup stale filenames from my previous
|
||||
|
@ -171,6 +263,8 @@
|
|||
* normal/menu_text.c: Include <grub/i18n.h>.
|
||||
* normal/menu_text.c (print_timeout): Gettexttize string.
|
||||
* normal/menu_text.c (print_message): Gettexttize string.
|
||||
* po/POTFILES: Add `normal/menu_text.c'.
|
||||
* po/ca.po: Add new translations.
|
||||
* util/grub.d/00_header.in: Define locale_dir and lang. insmod
|
||||
gettext module and defines locale_dir and lang in grub.cfg.
|
||||
* NEWS: Add gettext support.
|
||||
|
@ -373,6 +467,8 @@
|
|||
* Makefile.in (po/*.po): Redefine as ...
|
||||
($(foreach lang, $(LINGUAS), po/$(lang).po)): ... this.
|
||||
|
||||
* po/POTFILES: Add `util/i386/pc/grub-setup.c'.
|
||||
|
||||
2009-11-19 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/progname.c'.
|
||||
|
@ -391,6 +487,8 @@
|
|||
* util/mkisofs/tree.c: Likewise.
|
||||
* util/mkisofs/write.c: Likewise.
|
||||
|
||||
* po/POTFILES: Update with new files.
|
||||
|
||||
2009-11-18 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* util/mkisofs/eltorito.c: Fix minor mistake in license text.
|
||||
|
@ -418,6 +516,8 @@
|
|||
|
||||
2009-11-18 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* po/POTFILES-shell: New file. List `util/grub.d/10_kfreebsd.in'
|
||||
and `util/grub.d/10_linux.in'.
|
||||
* Makefile.in (po/$(PACKAGE).pot): Process `po/POTFILES-shell' for
|
||||
translatable Shell files.
|
||||
|
||||
|
@ -428,6 +528,7 @@
|
|||
2009-11-17 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* INSTALL: Document Automake is needed for bootstrap.
|
||||
* po/ca.po: Fix PO-Revision-Date and Language-Team fields.
|
||||
* util/grub.d/10_kfreebsd.in (bindir): New variable.
|
||||
Add gettext initialization.
|
||||
(kfreebsd_entry): Make menuentry output translatable.
|
||||
|
@ -439,6 +540,7 @@
|
|||
(po/*.po): Replace `msgmerge' with `$(MSGMERGE)'.
|
||||
(po/%.mo): Replace `msgfmt' with `$(MSGFMT)'.
|
||||
(LINGUAS): Auto-generate using `po/LINGUAS'.
|
||||
* po/LINGUAS: New file.
|
||||
|
||||
2009-11-17 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
|
@ -478,6 +580,8 @@
|
|||
(install-local): Install MO files.
|
||||
(po/$(PACKAGE).pot, po/*.po, po/%.mo): New rules.
|
||||
* include/grub/i18n.h: New file.
|
||||
* po/POTFILES: New file.
|
||||
* po/ca.po: New file.
|
||||
* util/grub.d/10_linux.in (bindir): New variable.
|
||||
Add gettext initialization.
|
||||
(linux_entry): Make menuentry output translatable.
|
||||
|
|
9
ChangeLog.bmpidx
Normal file
9
ChangeLog.bmpidx
Normal file
|
@ -0,0 +1,9 @@
|
|||
2009-11-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Optimise glyph lookup by Basic Multilingual Plane lookup array.
|
||||
|
||||
* font/font.c (struct grub_font): New member 'bmp_idx'.
|
||||
(font_init): Initialise 'bmp_idx'.
|
||||
(load_font_index): Fill 'bmp_idx'.
|
||||
(find_glyph): Make inline. Use bmp_idx for BMP characters.
|
||||
|
|
@ -45,7 +45,9 @@ XGETTEXT = @XGETTEXT@
|
|||
MSGMERGE = @MSGMERGE@
|
||||
MSGFMT = @MSGFMT@
|
||||
|
||||
LINGUAS = $(shell tr '\n' ' ' < $(srcdir)/po/LINGUAS)
|
||||
LINGUAS = $(shell for i in $(srcdir)/po/*.po ; do \
|
||||
if test -e $$i ; then echo $$i ; fi ; \
|
||||
done | sed -e "s,.*/po/\(.*\)\.po$$,\1,")
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
|
@ -480,7 +482,7 @@ $(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell
|
|||
cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f $< --keyword=_ --keyword=N_
|
||||
cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f po/POTFILES-shell -j --language=Shell
|
||||
|
||||
$(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): po/$(PACKAGE).pot
|
||||
po/%.po: po/$(PACKAGE).pot
|
||||
$(MSGMERGE) -U $@ $^
|
||||
|
||||
po/%.mo: po/%.po
|
||||
|
|
|
@ -11,8 +11,8 @@ script/lexer.c_DEPENDENCIES = grub_script.tab.h
|
|||
bin_UTILITIES = grub-mkimage
|
||||
|
||||
# For grub-mkimage.
|
||||
grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
|
||||
util/resolve.c
|
||||
grub_mkimage_SOURCES = gnulib/progname.c util/i386/efi/grub-mkimage.c \
|
||||
util/misc.c util/resolve.c
|
||||
util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile
|
||||
|
||||
# For grub-setup.
|
||||
|
@ -143,10 +143,15 @@ fixvideo_mod_SOURCES = commands/efi/fixvideo.c
|
|||
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
pkglib_MODULES += efi_fb.mod
|
||||
efi_fb_mod_SOURCES = video/efi_fb.c
|
||||
efi_fb_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
efi_fb_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
pkglib_MODULES += efi_uga.mod
|
||||
efi_uga_mod_SOURCES = video/efi_uga.c
|
||||
efi_uga_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
efi_uga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
pkglib_MODULES += efi_gop.mod
|
||||
efi_gop_mod_SOURCES = video/efi_gop.c
|
||||
efi_gop_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
efi_gop_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
pkglib_MODULES += xnu.mod
|
||||
xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c\
|
||||
|
|
|
@ -11,8 +11,8 @@ script/lexer.c_DEPENDENCIES = grub_script.tab.h
|
|||
bin_UTILITIES = grub-mkimage
|
||||
|
||||
# For grub-mkimage.
|
||||
grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
|
||||
util/resolve.c
|
||||
grub_mkimage_SOURCES = gnulib/progname.c util/i386/efi/grub-mkimage.c \
|
||||
util/misc.c util/resolve.c
|
||||
|
||||
# For grub-setup.
|
||||
#grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \
|
||||
|
@ -149,10 +149,15 @@ fixvideo_mod_SOURCES = commands/efi/fixvideo.c
|
|||
fixvideo_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
fixvideo_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
pkglib_MODULES += efi_fb.mod
|
||||
efi_fb_mod_SOURCES = video/efi_fb.c
|
||||
efi_fb_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
efi_fb_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
pkglib_MODULES += efi_uga.mod
|
||||
efi_uga_mod_SOURCES = video/efi_uga.c
|
||||
efi_uga_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
efi_uga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
pkglib_MODULES += efi_gop.mod
|
||||
efi_gop_mod_SOURCES = video/efi_gop.c
|
||||
efi_gop_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
efi_gop_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
pkglib_MODULES += xnu.mod
|
||||
xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c\
|
||||
|
|
26
font/font.c
26
font/font.c
|
@ -58,6 +58,7 @@ struct grub_font
|
|||
short leading;
|
||||
grub_uint32_t num_chars;
|
||||
struct char_index_entry *char_index;
|
||||
grub_uint16_t *bmp_idx;
|
||||
};
|
||||
|
||||
/* Definition of font registry. */
|
||||
|
@ -180,6 +181,7 @@ font_init (grub_font_t font)
|
|||
font->descent = 0;
|
||||
font->num_chars = 0;
|
||||
font->char_index = 0;
|
||||
font->bmp_idx = 0;
|
||||
}
|
||||
|
||||
/* Open the next section in the file.
|
||||
|
@ -273,6 +275,14 @@ load_font_index (grub_file_t file, grub_uint32_t sect_length, struct
|
|||
* sizeof (struct char_index_entry));
|
||||
if (! font->char_index)
|
||||
return 1;
|
||||
font->bmp_idx = grub_malloc (0x10000 * sizeof (grub_uint16_t));
|
||||
if (! font->bmp_idx)
|
||||
{
|
||||
grub_free (font->char_index);
|
||||
return 1;
|
||||
}
|
||||
grub_memset (font->bmp_idx, 0xff, 0x10000 * sizeof (grub_uint16_t));
|
||||
|
||||
|
||||
#if FONT_DEBUG >= 2
|
||||
grub_printf("num_chars=%d)\n", font->num_chars);
|
||||
|
@ -299,6 +309,9 @@ load_font_index (grub_file_t file, grub_uint32_t sect_length, struct
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (entry->code < 0x10000)
|
||||
font->bmp_idx[entry->code] = i;
|
||||
|
||||
last_code = entry->code;
|
||||
|
||||
/* Read storage flags byte. */
|
||||
|
@ -594,7 +607,7 @@ read_be_int16 (grub_file_t file, grub_int16_t * value)
|
|||
|
||||
/* Return a pointer to the character index entry for the glyph corresponding to
|
||||
the codepoint CODE in the font FONT. If not found, return zero. */
|
||||
static struct char_index_entry *
|
||||
static inline struct char_index_entry *
|
||||
find_glyph (const grub_font_t font, grub_uint32_t code)
|
||||
{
|
||||
struct char_index_entry *table;
|
||||
|
@ -602,8 +615,17 @@ find_glyph (const grub_font_t font, grub_uint32_t code)
|
|||
grub_size_t hi;
|
||||
grub_size_t mid;
|
||||
|
||||
/* Do a binary search in `char_index', which is ordered by code point. */
|
||||
table = font->char_index;
|
||||
|
||||
/* Use BMP index if possible. */
|
||||
if (code < 0x10000)
|
||||
{
|
||||
if (font->bmp_idx[code] == 0xffff)
|
||||
return 0;
|
||||
return &table[font->bmp_idx[code]];
|
||||
}
|
||||
|
||||
/* Do a binary search in `char_index', which is ordered by code point. */
|
||||
lo = 0;
|
||||
hi = font->num_chars - 1;
|
||||
|
||||
|
|
96
include/grub/efi/graphics_output.h
Normal file
96
include/grub/efi/graphics_output.h
Normal file
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_EFI_GOP_HEADER
|
||||
#define GRUB_EFI_GOP_HEADER 1
|
||||
|
||||
/* Based on UEFI specification. */
|
||||
|
||||
#define GRUB_EFI_GOP_GUID \
|
||||
{ 0x9042a9de, 0x23dc, 0x4a38, { 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a }}
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GRUB_EFI_GOT_RGBA8,
|
||||
GRUB_EFI_GOT_BGRA8,
|
||||
GRUB_EFI_GOT_BITMASK
|
||||
}
|
||||
grub_efi_gop_pixel_format_t;
|
||||
|
||||
struct grub_efi_gop_pixel_bitmask
|
||||
{
|
||||
grub_uint32_t r;
|
||||
grub_uint32_t g;
|
||||
grub_uint32_t b;
|
||||
grub_uint32_t a;
|
||||
};
|
||||
|
||||
struct grub_efi_gop_mode_info
|
||||
{
|
||||
grub_efi_uint32_t version;
|
||||
grub_efi_uint32_t width;
|
||||
grub_efi_uint32_t height;
|
||||
grub_efi_gop_pixel_format_t pixel_format;
|
||||
struct grub_efi_gop_pixel_bitmask pixel_bitmask;
|
||||
grub_efi_uint32_t pixels_per_scanline;
|
||||
};
|
||||
|
||||
struct grub_efi_gop_mode
|
||||
{
|
||||
grub_efi_uint32_t max_mode;
|
||||
grub_efi_uint32_t mode;
|
||||
struct grub_efi_gop_mode_info *info;
|
||||
grub_efi_uintn_t info_size;
|
||||
grub_efi_physical_address_t fb_base;
|
||||
grub_efi_uintn_t fb_size;
|
||||
};
|
||||
|
||||
/* Forward declaration. */
|
||||
struct grub_efi_gop;
|
||||
|
||||
typedef grub_efi_status_t
|
||||
(*grub_efi_gop_query_mode_t) (struct grub_efi_gop *this,
|
||||
grub_efi_uint32_t mode_number,
|
||||
grub_efi_uintn_t *size_of_info,
|
||||
struct grub_efi_gop_mode_info **info);
|
||||
|
||||
typedef grub_efi_status_t
|
||||
(*grub_efi_gop_set_mode_t) (struct grub_efi_gop *this,
|
||||
grub_efi_uint32_t mode_number);
|
||||
|
||||
typedef grub_efi_status_t
|
||||
(*grub_efi_gop_blt_t) (struct grub_efi_gop *this,
|
||||
void *buffer,
|
||||
grub_efi_uintn_t operation,
|
||||
grub_efi_uintn_t sx,
|
||||
grub_efi_uintn_t sy,
|
||||
grub_efi_uintn_t dx,
|
||||
grub_efi_uintn_t dy,
|
||||
grub_efi_uintn_t width,
|
||||
grub_efi_uintn_t height,
|
||||
grub_efi_uintn_t delta);
|
||||
|
||||
struct grub_efi_gop
|
||||
{
|
||||
grub_efi_gop_query_mode_t query_mode;
|
||||
grub_efi_gop_set_mode_t set_mode;
|
||||
grub_efi_gop_blt_t blt;
|
||||
struct grub_efi_gop_mode *mode;
|
||||
};
|
||||
|
||||
#endif
|
43
po/ChangeLog
43
po/ChangeLog
|
@ -1,43 +0,0 @@
|
|||
2009-11-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* zh_CN.po: New file.
|
||||
* LINGUAS: Add `zh_CN'.
|
||||
|
||||
2009-11-23 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* id.po: New file.
|
||||
* LINGUAS: Add `id'.
|
||||
|
||||
2009-11-23 Carles Pina i Estany <carles@pina.cat>
|
||||
|
||||
* POTFILES: Add `normal/menu_text.c'.
|
||||
* ca.po: Add new translations.
|
||||
|
||||
2009-11-19 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* POTFILES: Add `util/i386/pc/grub-setup.c'.
|
||||
|
||||
2009-11-19 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* POTFILES: Add `util/mkisofs/eltorito.c', `util/mkisofs/joliet.c',
|
||||
`util/mkisofs/mkisofs.c', `util/mkisofs/multi.c',
|
||||
`util/mkisofs/rock.c', `util/mkisofs/tree.c', and
|
||||
`util/mkisofs/write.c'.
|
||||
|
||||
2009-11-18 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* POTFILES-shell: New file. List `util/grub.d/10_kfreebsd.in'
|
||||
and `util/grub.d/10_linux.in'.
|
||||
|
||||
2009-11-17 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* ca.po: Fix PO-Revision-Date and Language-Team fields.
|
||||
|
||||
2009-11-17 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* LINGUAS: New file.
|
||||
|
||||
2009-11-16 Robert Millan <rmh.grub@aybabtu.com>
|
||||
|
||||
* POTFILES: New file.
|
||||
* ca.po: New file.
|
|
@ -1,3 +0,0 @@
|
|||
ca
|
||||
id
|
||||
zh_CN
|
24
po/README
Normal file
24
po/README
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
If you checked out this source tree directly from GRUB Bazaar, you might
|
||||
be wondering where are the POT and PO files. Here are some instructions
|
||||
that will hopefully clarify the situation.
|
||||
|
||||
- If you're a user or a distributor, simply fill the po directory by
|
||||
importing translations from the Translation Project:
|
||||
|
||||
rsync -Lrtvz translationproject.org::tp/latest/grub/ po
|
||||
|
||||
GRUB's build system will automatically detect those and include them
|
||||
in your install.
|
||||
|
||||
- If you're a translator and want to add a new translation or improve an
|
||||
existing one, get in touch with the Translation Project
|
||||
(http://translationproject.org/). The GRUB project doesn't interact
|
||||
with translators directly (but we dearly appreciate your work!).
|
||||
|
||||
- If you're a developer adding/removing/modifiing translatable strings,
|
||||
you can check that these turn into a sane POT file by using the
|
||||
`po/grub.pot' make rule.
|
||||
|
||||
- If you're the maintainer of GNU GRUB preparing a new release, don't
|
||||
forget to include the latest PO files in your source tarball!
|
832
po/zh_CN.po
832
po/zh_CN.po
|
@ -1,832 +0,0 @@
|
|||
# Simplified Chinese translations for grub package
|
||||
# grub 软件包的简体中文翻译。
|
||||
# Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
# This file is distributed under the same license as the grub package.
|
||||
# Aron Xu <happyaron.xu@gmail.com>, 2009.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: grub 1.97+20091122\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2009-11-22 11:48+0100\n"
|
||||
"PO-Revision-Date: 2009-11-23 18:36+0800\n"
|
||||
"Last-Translator: Aron Xu <happyaron.xu@gmail.com>\n"
|
||||
"Language-Team: Chinese (simplified) <translation-team-zh-cn@lists.sourceforge.net>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: util/i386/pc/grub-mkimage.c:65
|
||||
msgid "the core image is too small"
|
||||
msgstr "核心映像太小"
|
||||
|
||||
#: util/i386/pc/grub-mkimage.c:77
|
||||
msgid "cannot compress the kernel image"
|
||||
msgstr "无法压缩内核映像"
|
||||
|
||||
#: util/i386/pc/grub-mkimage.c:138
|
||||
msgid "prefix is too long"
|
||||
msgstr "前缀太长"
|
||||
|
||||
#: util/i386/pc/grub-mkimage.c:206
|
||||
msgid "the core image is too big"
|
||||
msgstr "核心映像太大"
|
||||
|
||||
#: util/i386/pc/grub-mkimage.c:211
|
||||
#, c-format
|
||||
msgid "diskboot.img size must be %u bytes"
|
||||
msgstr "diskboot.img 的大小必须为 %u 字节"
|
||||
|
||||
#: util/i386/pc/grub-mkimage.c:284
|
||||
#, c-format
|
||||
msgid "Core image is too big (%p > %p)\n"
|
||||
msgstr "核心映像太大(%p > %p)\n"
|
||||
|
||||
#: util/i386/pc/grub-mkimage.c:321 util/i386/pc/grub-setup.c:587
|
||||
#, c-format
|
||||
msgid "Try ``%s --help'' for more information.\n"
|
||||
msgstr "请尝试运行 ``%s --help'' 以获得更多信息。\n"
|
||||
|
||||
#: util/i386/pc/grub-mkimage.c:323
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: grub-mkimage [OPTION]... [MODULES]\n"
|
||||
"\n"
|
||||
"Make a bootable image of GRUB.\n"
|
||||
"\n"
|
||||
" -d, --directory=DIR use images and modules under DIR [default=%s]\n"
|
||||
" -p, --prefix=DIR set grub_prefix directory [default=%s]\n"
|
||||
" -m, --memdisk=FILE embed FILE as a memdisk image\n"
|
||||
" -c, --config=FILE embed FILE as boot config\n"
|
||||
" -o, --output=FILE output a generated image to FILE [default=stdout]\n"
|
||||
" -h, --help display this message and exit\n"
|
||||
" -V, --version print version information and exit\n"
|
||||
" -v, --verbose print verbose messages\n"
|
||||
"\n"
|
||||
"Report bugs to <%s>.\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-mkimage.c:429
|
||||
#, c-format
|
||||
msgid "cannot open %s"
|
||||
msgstr "无法打开 %s"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:166
|
||||
msgid "The first sector of the core file is not sector-aligned"
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:180
|
||||
msgid "Non-sector-aligned data is found in the core file"
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:194
|
||||
msgid "The sectors of the core file are too fragmented"
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:205
|
||||
#, c-format
|
||||
msgid "The size of `%s' is not %u"
|
||||
msgstr "`%s' 的大小不是 %u"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:222
|
||||
#, c-format
|
||||
msgid "The size of `%s' is too small"
|
||||
msgstr "`%s' 太小"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:224
|
||||
#, c-format
|
||||
msgid "The size of `%s' is too large"
|
||||
msgstr "`%s' 太大"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:261
|
||||
#, c-format
|
||||
msgid "Unable to identify a filesystem in %s; safety check can't be performed"
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:265
|
||||
#, c-format
|
||||
msgid "%s appears to contain a %s filesystem which isn't known to reserve space for DOS-style boot. Installing GRUB there could result in FILESYSTEM DESTRUCTION if valuable data is overwritten by grub-setup (--skip-fs-probe disables this check, use at your own risk)"
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:314
|
||||
msgid "No DOS-style partitions found"
|
||||
msgstr "未找到 DOS 类型分区"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:330 util/i386/pc/grub-setup.c:355
|
||||
msgid "Attempting to install GRUB to a partitionless disk. This is a BAD idea."
|
||||
msgstr "正在试图安装 GRUB 到未分区的磁盘。 这是一个坏主意。"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:336
|
||||
msgid "Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea."
|
||||
msgstr "正在试图安装 GRUB 到分区而非 MBR。 这是一个坏主意。"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:365
|
||||
msgid "This msdos-style partition label has no post-MBR gap; embedding won't be possible!"
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:367
|
||||
msgid "This GPT partition label has no BIOS Boot Partition; embedding won't be possible!"
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:374
|
||||
msgid "Your core.img is unusually large. It won't fit in the embedding area."
|
||||
msgstr "您的 core.img 超乎寻常的巨大。它不适用于嵌入式环境。"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:376
|
||||
msgid "Your embedding area is unusually small. core.img won't fit in it."
|
||||
msgstr "您的嵌入式环境超乎寻常的小。core.img 无法适用于此处。"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:418
|
||||
msgid "Embedding is not possible, but this is required when the root device is on a RAID array or LVM volume."
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:421
|
||||
msgid "Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged."
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:425
|
||||
msgid "If you really want blocklists, use --force."
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:439
|
||||
#, c-format
|
||||
msgid "attempting to read the core image `%s' from GRUB"
|
||||
msgstr "正在尝试从 GRUB 读取核心映像 `%s'"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:440
|
||||
#, c-format
|
||||
msgid "attempting to read the core image `%s' from GRUB again"
|
||||
msgstr "正在再次尝试从 GRUB 读取核心映像 `%s'"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:498
|
||||
#, c-format
|
||||
msgid "Cannot read `%s' correctly"
|
||||
msgstr "无法正确读取 `%s'"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:511
|
||||
msgid "No terminator in the core image"
|
||||
msgstr "核心映像中没有终止符"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:522
|
||||
msgid "Failed to read the first sector of the core image"
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:528
|
||||
msgid "Failed to read the rest sectors of the core image"
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:547
|
||||
#, c-format
|
||||
msgid "Cannot open `%s'"
|
||||
msgstr "无法打开 `%s'"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:589
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: grub-setup [OPTION]... DEVICE\n"
|
||||
"\n"
|
||||
"Set up images to boot from DEVICE.\n"
|
||||
"DEVICE must be a GRUB device (e.g. ``(hd0,1)'').\n"
|
||||
"\n"
|
||||
" -b, --boot-image=FILE use FILE as the boot image [default=%s]\n"
|
||||
" -c, --core-image=FILE use FILE as the core image [default=%s]\n"
|
||||
" -d, --directory=DIR use GRUB files in the directory DIR [default=%s]\n"
|
||||
" -m, --device-map=FILE use FILE as the device map [default=%s]\n"
|
||||
" -r, --root-device=DEV use DEV as the root device [default=guessed]\n"
|
||||
" -f, --force install even if problems are detected\n"
|
||||
" -s, --skip-fs-probe do not probe for filesystems in DEVICE\n"
|
||||
" -h, --help display this message and exit\n"
|
||||
" -V, --version print version information and exit\n"
|
||||
" -v, --verbose print verbose messages\n"
|
||||
"\n"
|
||||
"Report bugs to <%s>.\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/i386/pc/grub-setup.c:719
|
||||
#, c-format
|
||||
msgid "No device is specified.\n"
|
||||
msgstr "没有指定设备。\n"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:725
|
||||
#, c-format
|
||||
msgid "Unknown extra argument `%s'.\n"
|
||||
msgstr "未知的额外参数 `%s'。\n"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:742
|
||||
#, c-format
|
||||
msgid "Invalid device `%s'.\n"
|
||||
msgstr "无效的设备 `%s'。\n"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:755
|
||||
#, c-format
|
||||
msgid "Invalid root device `%s'"
|
||||
msgstr "无效的根设备 `%s'"
|
||||
|
||||
#: util/i386/pc/grub-setup.c:768
|
||||
msgid "Cannot guess the root device. Specify the option ``--root-device''."
|
||||
msgstr "无法猜测根设备。请使用 ``--root-device'' 选项指定。"
|
||||
|
||||
#: util/mkisofs/eltorito.c:96
|
||||
#, c-format
|
||||
msgid "A boot catalog exists and appears corrupted.\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/eltorito.c:97
|
||||
#, c-format
|
||||
msgid "Please check the following file: %s.\n"
|
||||
msgstr "请检查以下文件:%s。\n"
|
||||
|
||||
#: util/mkisofs/eltorito.c:98
|
||||
#, c-format
|
||||
msgid "This file must be removed before a bootable CD can be done.\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/eltorito.c:110
|
||||
#, c-format
|
||||
msgid "Error creating boot catalog (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/eltorito.c:114
|
||||
#, c-format
|
||||
msgid "Error writing to boot catalog (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/eltorito.c:144
|
||||
#, c-format
|
||||
msgid "Boot catalog cannot be found!\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/eltorito.c:158
|
||||
#, c-format
|
||||
msgid "Boot image cannot be found!\n"
|
||||
msgstr "无法找到引导映像!\n"
|
||||
|
||||
#: util/mkisofs/eltorito.c:221
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Size of boot image is %d sectors"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"引导映像的大小为 %d 个扇区"
|
||||
|
||||
#: util/mkisofs/eltorito.c:227
|
||||
#, c-format
|
||||
msgid "No emulation\n"
|
||||
msgstr "无模拟\n"
|
||||
|
||||
#: util/mkisofs/eltorito.c:235
|
||||
#, c-format
|
||||
msgid "Emulating a 1.44 meg floppy\n"
|
||||
msgstr "模拟 1.44MiB 软盘\n"
|
||||
|
||||
#: util/mkisofs/eltorito.c:240
|
||||
#, c-format
|
||||
msgid "Emulating a 2.88 meg floppy\n"
|
||||
msgstr "模拟 2.88MiB 软盘\n"
|
||||
|
||||
#: util/mkisofs/eltorito.c:245
|
||||
#, c-format
|
||||
msgid "Emulating a 1.2 meg floppy\n"
|
||||
msgstr "模拟 1.2MiB 软盘\n"
|
||||
|
||||
#: util/mkisofs/eltorito.c:249
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Error - boot image is not the an allowable size.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"错误 - 引导映像大小不允许。\n"
|
||||
|
||||
#: util/mkisofs/eltorito.c:269
|
||||
msgid "Error opening boot catalog for update"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/eltorito.c:275 util/mkisofs/eltorito.c:277
|
||||
msgid "Error writing to boot catalog"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/eltorito.c:291
|
||||
#, c-format
|
||||
msgid "Error opening boot image file '%s' for update"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/eltorito.c:299
|
||||
#, c-format
|
||||
msgid "Odd alignment at non-end-of-file in boot image '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/eltorito.c:311
|
||||
#, c-format
|
||||
msgid "Boot image file '%s' changed unexpectedly"
|
||||
msgstr "引导映像文件 '%s' 意外改变"
|
||||
|
||||
#: util/mkisofs/eltorito.c:323
|
||||
#, c-format
|
||||
msgid "Error writing to boot image (%s)"
|
||||
msgstr "写入到引导映像出错(%s)"
|
||||
|
||||
#: util/mkisofs/joliet.c:359 util/mkisofs/write.c:981
|
||||
#, c-format
|
||||
msgid "Unable to generate sane path tables - too many directories (%d)\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/joliet.c:398 util/mkisofs/write.c:1017
|
||||
#, c-format
|
||||
msgid "Entry %d not in path tables\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/joliet.c:412
|
||||
#, c-format
|
||||
msgid "Fatal goof - directory has amnesia\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/joliet.c:478
|
||||
#, c-format
|
||||
msgid "Joliet path table lengths do not match %d %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/joliet.c:530
|
||||
#, c-format
|
||||
msgid "Unable to locate relocated directory\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/joliet.c:605
|
||||
#, c-format
|
||||
msgid "Fatal goof - unable to find directory location\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/joliet.c:654
|
||||
#, c-format
|
||||
msgid "Unexpected joliet directory length %d %d %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:373
|
||||
#, c-format
|
||||
msgid "Using \"%s\"\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:401
|
||||
#, c-format
|
||||
msgid "%s:%d: name required\n"
|
||||
msgstr "%s:%d:需要名称\n"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:411
|
||||
#, c-format
|
||||
msgid "%s:%d: equals sign required\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:445
|
||||
#, c-format
|
||||
msgid "%s:%d: field name \"%s\" unknown\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:474
|
||||
#, c-format
|
||||
msgid "Usage: %s [options] file...\n"
|
||||
msgstr "用法:%s [选项] 文件...\n"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:476
|
||||
#, c-format
|
||||
msgid "Options:\n"
|
||||
msgstr "选项:\n"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:706
|
||||
#, c-format
|
||||
msgid "-i option no longer supported.\n"
|
||||
msgstr "-i 选项已不再被支持。\n"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:720
|
||||
#, c-format
|
||||
msgid "Required boot image pathname missing\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:729
|
||||
#, c-format
|
||||
msgid "Required boot catalog pathname missing\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:737
|
||||
#, c-format
|
||||
msgid "Ignoring -no-emul-boot (no-emulation is the default behaviour)\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:746
|
||||
#, c-format
|
||||
msgid "Abstract filename string too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:754
|
||||
#, c-format
|
||||
msgid "Application-id string too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:762
|
||||
#, c-format
|
||||
msgid "Bibliographic filename string too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:770
|
||||
#, c-format
|
||||
msgid "Copyright filename string too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:805
|
||||
#, c-format
|
||||
msgid "Preparer string too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:816
|
||||
#, c-format
|
||||
msgid "Publisher string too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:837
|
||||
#, c-format
|
||||
msgid "System ID string too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:848
|
||||
#, c-format
|
||||
msgid "Volume ID string too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:856
|
||||
#, c-format
|
||||
msgid "Volume set ID string too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:867
|
||||
#, c-format
|
||||
msgid "Volume set sequence number too big\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:909 util/mkisofs/mkisofs.c:919
|
||||
#: util/mkisofs/mkisofs.c:929 util/mkisofs/mkisofs.c:939
|
||||
#, c-format
|
||||
msgid "date string must be 16 characters.\n"
|
||||
msgstr "日期字符串长度必须为 16。\n"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:958
|
||||
msgid "Warning: getrlimit"
|
||||
msgstr "警告:getrlimit"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:962
|
||||
msgid "Warning: setrlimit"
|
||||
msgstr "警告:setrlimit"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:978
|
||||
#, c-format
|
||||
msgid "Multisession usage bug: Must specify -C if -M is used.\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:984
|
||||
#, c-format
|
||||
msgid "Warning: -C specified without -M: old session data will not be merged.\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:1023
|
||||
#, c-format
|
||||
msgid "can't open logfile: %s"
|
||||
msgstr "无法打开日志文件:%s"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:1027
|
||||
#, c-format
|
||||
msgid "re-directing all messages to %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:1032
|
||||
#, c-format
|
||||
msgid "can't open logfile: %s\n"
|
||||
msgstr "无法打开日志文件:%s\n"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:1073
|
||||
#, c-format
|
||||
msgid "Unable to open previous session image %s\n"
|
||||
msgstr "无法打开上一会话使用的映像 %s\n"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:1184
|
||||
#, c-format
|
||||
msgid "Invalid node - %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:1246
|
||||
msgid "Joliet tree sort failed.\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:1261
|
||||
msgid "Unable to open /dev/null\n"
|
||||
msgstr "无法打开 /dev/null\n"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:1265
|
||||
msgid "Unable to open disc image file\n"
|
||||
msgstr "无法打开磁盘映像文件\n"
|
||||
|
||||
#: util/mkisofs/mkisofs.c:1387
|
||||
#, c-format
|
||||
msgid "Max brk space used %x\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/mkisofs.c:1390
|
||||
#, c-format
|
||||
msgid "%llu extents written (%llu MiB)\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/multi.c:161
|
||||
msgid "Seek error on old image\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/multi.c:179 util/mkisofs/multi.c:250
|
||||
#, c-format
|
||||
msgid "**Bad RR version attribute"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/multi.c:546
|
||||
#, c-format
|
||||
msgid "Warning: Neither Rock Ridge (-R) nor TRANS.TBL (-T) name translations were found on previous session. ISO (8.3) file names have been used instead.\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/multi.c:764
|
||||
#, c-format
|
||||
msgid "Read error on old image %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/multi.c:1084
|
||||
msgid "Special parameters for cdwrite not specified with -C\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/multi.c:1091
|
||||
msgid "Malformed cdwrite parameters\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/rock.c:309
|
||||
#, c-format
|
||||
msgid "symbolic link ``%s'' to long for one SL System Use Field, splitting"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/rock.c:517
|
||||
#, c-format
|
||||
msgid "Unable to insert transparent compressed file - name conflict\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/rock.c:591
|
||||
msgid "Extension record too long\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:226 util/mkisofs/write.c:565 util/mkisofs/write.c:1037
|
||||
msgid "Fatal goof\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:284
|
||||
#, c-format
|
||||
msgid "Unable to generate unique name for file %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:295 util/mkisofs/tree.c:317
|
||||
#, c-format
|
||||
msgid "Using %s for %s%s%s (%s)\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:441
|
||||
#, c-format
|
||||
msgid "Fatal error - RR overflow for file %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:449
|
||||
#, c-format
|
||||
msgid "Unable to sort directory %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:480
|
||||
#, c-format
|
||||
msgid "Translation table size mismatch %d %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:746
|
||||
msgid "Unable to locate directory parent\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:796
|
||||
#, c-format
|
||||
msgid "Scanning %s\n"
|
||||
msgstr "正在扫描 %s\n"
|
||||
|
||||
#: util/mkisofs/tree.c:811
|
||||
#, c-format
|
||||
msgid "Unable to open directory %s\n"
|
||||
msgstr "无法打开目录 %s\n"
|
||||
|
||||
#: util/mkisofs/tree.c:856
|
||||
#, c-format
|
||||
msgid "Ignoring file %s\n"
|
||||
msgstr "忽略文件 %s\n"
|
||||
|
||||
#: util/mkisofs/tree.c:863
|
||||
msgid "Overflow of stat buffer\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:876
|
||||
#, c-format
|
||||
msgid "Excluded by match: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:891
|
||||
#, c-format
|
||||
msgid "Excluded: %s\n"
|
||||
msgstr "已排除:%s\n"
|
||||
|
||||
#: util/mkisofs/tree.c:961
|
||||
#, c-format
|
||||
msgid "Non-existant or inaccessible: %s\n"
|
||||
msgstr "不存在或不可访问:%s\n"
|
||||
|
||||
#: util/mkisofs/tree.c:997 util/mkisofs/tree.c:1103
|
||||
#, c-format
|
||||
msgid "Unable to stat file %s - ignoring and continuing.\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:1003
|
||||
#, c-format
|
||||
msgid "Symlink %s ignored - continuing.\n"
|
||||
msgstr "已忽略符号链接 %s - 继续。\n"
|
||||
|
||||
#: util/mkisofs/tree.c:1028
|
||||
#, c-format
|
||||
msgid "Already cached directory seen (%s)\n"
|
||||
msgstr "发现已缓冲目录(%s)\n"
|
||||
|
||||
#: util/mkisofs/tree.c:1070
|
||||
#, c-format
|
||||
msgid "File %s is not readable (%s) - ignoring\n"
|
||||
msgstr "文件 %s 无法读取(%s) - 忽略\n"
|
||||
|
||||
#: util/mkisofs/tree.c:1083
|
||||
#, c-format
|
||||
msgid "Directory loop - fatal goof (%s %lx %lu).\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:1093
|
||||
#, c-format
|
||||
msgid "Unknown file type %s - ignoring and continuing.\n"
|
||||
msgstr "未知文件类型 %s - 忽略并继续。\n"
|
||||
|
||||
#: util/mkisofs/tree.c:1179
|
||||
#, c-format
|
||||
msgid "Hidden from ISO9660 tree: %s\n"
|
||||
msgstr "从 ISO9660 树隐藏:%s\n"
|
||||
|
||||
#: util/mkisofs/tree.c:1191
|
||||
#, c-format
|
||||
msgid "Hidden from Joliet tree: %s\n"
|
||||
msgstr "从 Joliet 树隐藏:%s\n"
|
||||
|
||||
#: util/mkisofs/tree.c:1600
|
||||
#, c-format
|
||||
msgid "Directories too deep %s\n"
|
||||
msgstr "目录层次太深 %s\n"
|
||||
|
||||
#: util/mkisofs/tree.c:1632
|
||||
msgid "Unable to delete non-empty directory\n"
|
||||
msgstr "无法删除非空目录\n"
|
||||
|
||||
#: util/mkisofs/tree.c:1655
|
||||
msgid "Unable to locate child directory in parent list\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:1772
|
||||
#, c-format
|
||||
msgid "call to search_tree_file with an absolute path, stripping\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/tree.c:1773
|
||||
#, c-format
|
||||
msgid "initial path separator. Hope this was intended...\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/write.c:158
|
||||
#, c-format
|
||||
msgid "Cannot open '%s'"
|
||||
msgstr "无法打开 '%s'"
|
||||
|
||||
#: util/mkisofs/write.c:166
|
||||
#, c-format
|
||||
msgid "cannot fwrite %llu*%llu\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/write.c:248
|
||||
#, c-format
|
||||
msgid "cannot open %s\n"
|
||||
msgstr "无法打开 %s\n"
|
||||
|
||||
#: util/mkisofs/write.c:257
|
||||
#, c-format
|
||||
msgid "cannot read %llu bytes from %s"
|
||||
msgstr "无法从 %2$s 读取 %1$llu 字节"
|
||||
|
||||
#: util/mkisofs/write.c:275
|
||||
#, c-format
|
||||
msgid "%6.2f%% done, estimate finish %s"
|
||||
msgstr "已完成 %6.2f%%,估计 %s 完成"
|
||||
|
||||
#: util/mkisofs/write.c:542
|
||||
#, c-format
|
||||
msgid "Cache hit for %s%s%s\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/write.c:896
|
||||
#, c-format
|
||||
msgid "Unexpected directory length %d %d %s\n"
|
||||
msgstr "目录长度意外 %d %d %s\n"
|
||||
|
||||
#: util/mkisofs/write.c:908
|
||||
#, c-format
|
||||
msgid "Continuation entry record length mismatch (%d %d).\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/write.c:1072
|
||||
#, c-format
|
||||
msgid "Path table lengths do not match %d %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/write.c:1118 util/mkisofs/write.c:1128
|
||||
#, c-format
|
||||
msgid "Total extents scheduled to be written = %llu\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/write.c:1145
|
||||
#, c-format
|
||||
msgid "Total extents actually written = %llu\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/write.c:1154
|
||||
#, c-format
|
||||
msgid "Number of extents written different than what was predicted. Please fix.\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/write.c:1155
|
||||
#, c-format
|
||||
msgid "Predicted = %d, written = %llu\n"
|
||||
msgstr "预计 = %d,已写入 = %llu\n"
|
||||
|
||||
#: util/mkisofs/write.c:1158
|
||||
#, c-format
|
||||
msgid "Total translation table size: %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/write.c:1159
|
||||
#, c-format
|
||||
msgid "Total rockridge attributes bytes: %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/write.c:1160
|
||||
#, c-format
|
||||
msgid "Total directory bytes: %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/mkisofs/write.c:1161
|
||||
#, c-format
|
||||
msgid "Path table size(bytes): %d\n"
|
||||
msgstr ""
|
||||
|
||||
#: util/grub.d/10_kfreebsd.in:40
|
||||
msgid "%s, with kFreeBSD %s"
|
||||
msgstr ""
|
||||
|
||||
#: util/grub.d/10_linux.in:57
|
||||
msgid "%s, with Linux %s (recovery mode)"
|
||||
msgstr ""
|
||||
|
||||
#: util/grub.d/10_linux.in:59
|
||||
msgid "%s, with Linux %s"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "the size of memory disk is 0x%x"
|
||||
#~ msgstr "内存磁盘大小为 0x%x"
|
||||
|
||||
#~ msgid "the size of config file is 0x%x"
|
||||
#~ msgstr "配置文件大小为 0x%x"
|
||||
|
||||
#~ msgid "the total module size is 0x%x"
|
||||
#~ msgstr "模块总计大小为 0x%x"
|
||||
|
||||
#~ msgid "the core size is 0x%x"
|
||||
#~ msgstr "核心大小位 0x%x"
|
||||
|
||||
#~ msgid "setting the root device to `%s'"
|
||||
#~ msgstr "设置 `%s' 为根设备"
|
||||
|
||||
#~ msgid "dos partition is %d, bsd partition is %d"
|
||||
#~ msgstr "DOS 分区为 %d,BSD 分区为 %d"
|
||||
|
||||
#~ msgid "the core image will be embedded at sector 0x%llx"
|
||||
#~ msgstr "核心映像将被嵌入于 0x%llx 扇区"
|
||||
|
||||
#~ msgid "error message = %s"
|
||||
#~ msgstr "错误信息 = %s"
|
||||
|
||||
#~ msgid "opening the core image `%s'"
|
||||
#~ msgstr "正在打开核心映像 `%s'"
|
||||
|
||||
#~ msgid "guessing the root device failed, because of `%s'"
|
||||
#~ msgstr "猜测根设备失败,原因为 `%s'"
|
|
@ -238,33 +238,36 @@ probe (const char *path, char *device_name)
|
|||
|
||||
if (print == PRINT_FS)
|
||||
{
|
||||
struct stat st;
|
||||
if (path)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
stat (path, &st);
|
||||
stat (path, &st);
|
||||
|
||||
if (S_ISREG (st.st_mode))
|
||||
{
|
||||
/* Regular file. Verify that we can read it properly. */
|
||||
if (S_ISREG (st.st_mode))
|
||||
{
|
||||
/* Regular file. Verify that we can read it properly. */
|
||||
|
||||
grub_file_t file;
|
||||
char *rel_path;
|
||||
grub_util_info ("reading %s via OS facilities", path);
|
||||
filebuf_via_sys = grub_util_read_image (path);
|
||||
grub_file_t file;
|
||||
char *rel_path;
|
||||
grub_util_info ("reading %s via OS facilities", path);
|
||||
filebuf_via_sys = grub_util_read_image (path);
|
||||
|
||||
rel_path = make_system_path_relative_to_its_root (path);
|
||||
asprintf (&grub_path, "(%s)%s", drive_name, rel_path);
|
||||
free (rel_path);
|
||||
grub_util_info ("reading %s via GRUB facilities", grub_path);
|
||||
file = grub_file_open (grub_path);
|
||||
if (! file)
|
||||
grub_util_error ("can not open %s via GRUB facilities", grub_path);
|
||||
filebuf_via_grub = xmalloc (file->size);
|
||||
grub_file_read (file, filebuf_via_grub, file->size);
|
||||
rel_path = make_system_path_relative_to_its_root (path);
|
||||
asprintf (&grub_path, "(%s)%s", drive_name, rel_path);
|
||||
free (rel_path);
|
||||
grub_util_info ("reading %s via GRUB facilities", grub_path);
|
||||
file = grub_file_open (grub_path);
|
||||
if (! file)
|
||||
grub_util_error ("can not open %s via GRUB facilities", grub_path);
|
||||
filebuf_via_grub = xmalloc (file->size);
|
||||
grub_file_read (file, filebuf_via_grub, file->size);
|
||||
|
||||
grub_util_info ("comparing");
|
||||
grub_util_info ("comparing");
|
||||
|
||||
if (memcmp (filebuf_via_grub, filebuf_via_sys, file->size))
|
||||
grub_util_error ("files differ");
|
||||
if (memcmp (filebuf_via_grub, filebuf_via_sys, file->size))
|
||||
grub_util_error ("files differ");
|
||||
}
|
||||
}
|
||||
|
||||
printf ("%s\n", fs->name);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <grub/kernel.h>
|
||||
#include <grub/efi/pe32.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
#include "progname.h"
|
||||
|
||||
#if GRUB_TARGET_WORDSIZE == 32
|
||||
# define grub_le_to_cpu(val) grub_le_to_cpu32(val)
|
||||
|
@ -1056,7 +1057,7 @@ main (int argc, char *argv[])
|
|||
char *dir = NULL;
|
||||
char *prefix = NULL;
|
||||
|
||||
progname = "grub-mkimage";
|
||||
program_name = "grub-mkimage";
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
|
@ -202,17 +202,17 @@ static const struct ld_option ld_options[] =
|
|||
{ {"all-files", no_argument, NULL, 'a'},
|
||||
'a', NULL, N_("Process all files (don't skip backup files)"), ONE_DASH },
|
||||
{ {"abstract", required_argument, NULL, OPTION_ABSTRACT},
|
||||
'\0', "FILE", N_("Set Abstract filename"), ONE_DASH },
|
||||
'\0', N_("FILE"), N_("Set Abstract filename"), ONE_DASH },
|
||||
{ {"appid", required_argument, NULL, 'A'},
|
||||
'A', "ID", N_("Set Application ID"), ONE_DASH },
|
||||
'A', N_("ID"), N_("Set Application ID"), ONE_DASH },
|
||||
{ {"biblio", required_argument, NULL, OPTION_BIBLIO},
|
||||
'\0', "FILE", N_("Set Bibliographic filename"), ONE_DASH },
|
||||
'\0', N_("FILE"), N_("Set Bibliographic filename"), ONE_DASH },
|
||||
{ {"copyright", required_argument, NULL, OPTION_COPYRIGHT},
|
||||
'\0', "FILE", N_("Set Copyright filename"), ONE_DASH },
|
||||
'\0', N_("FILE"), N_("Set Copyright filename"), ONE_DASH },
|
||||
{ {"eltorito-boot", required_argument, NULL, 'b'},
|
||||
'b', "FILE", N_("Set El Torito boot image name"), ONE_DASH },
|
||||
'b', N_("FILE"), N_("Set El Torito boot image name"), ONE_DASH },
|
||||
{ {"eltorito-catalog", required_argument, NULL, 'c'},
|
||||
'c', "FILE", N_("Set El Torito boot catalog name"), ONE_DASH },
|
||||
'c', N_("FILE"), N_("Set El Torito boot catalog name"), ONE_DASH },
|
||||
{ {"boot-info-table", no_argument, NULL, OPTION_BOOT_INFO_TABLE },
|
||||
'\0', NULL, N_("Patch Boot Info Table in El Torito boot image"), ONE_DASH },
|
||||
{ {"no-emul-boot", no_argument, NULL, OPTION_NO_EMUL_BOOT },
|
||||
|
@ -220,7 +220,7 @@ static const struct ld_option ld_options[] =
|
|||
{ {"eltorito-emul-floppy", no_argument, NULL, OPTION_ELTORITO_EMUL_FLOPPY },
|
||||
'\0', NULL, N_("Enable floppy drive emulation for El Torito"), TWO_DASHES },
|
||||
{ {"cdwrite-params", required_argument, NULL, 'C'},
|
||||
'C', "PARAMS", N_("Magic parameters from cdrecord"), ONE_DASH },
|
||||
'C', N_("PARAMS"), N_("Magic parameters from cdrecord"), ONE_DASH },
|
||||
{ {"omit-period", no_argument, NULL, 'd'},
|
||||
'd', NULL, N_("Omit trailing periods from filenames"), ONE_DASH },
|
||||
{ {"disable-deep-relocation", no_argument, NULL, 'D'},
|
||||
|
@ -234,11 +234,11 @@ static const struct ld_option ld_options[] =
|
|||
{ {"version", no_argument, NULL, OPTION_VERSION},
|
||||
'\0', NULL, N_("Print version information and exit"), TWO_DASHES },
|
||||
{ {"hide", required_argument, NULL, OPTION_I_HIDE},
|
||||
'\0', "GLOBFILE", N_("Hide ISO9660/RR file"), ONE_DASH },
|
||||
'\0', N_("GLOBFILE"), N_("Hide ISO9660/RR file"), ONE_DASH },
|
||||
{ {"hide-joliet", required_argument, NULL, OPTION_J_HIDE},
|
||||
'\0', "GLOBFILE", N_("Hide Joliet file"), ONE_DASH },
|
||||
'\0', N_("GLOBFILE"), N_("Hide Joliet file"), ONE_DASH },
|
||||
{ {NULL, required_argument, NULL, 'i'},
|
||||
'i', "ADD_FILES", N_("No longer supported"), TWO_DASHES },
|
||||
'i', N_("ADD_FILES"), N_("No longer supported"), TWO_DASHES },
|
||||
{ {"joliet", no_argument, NULL, 'J'},
|
||||
'J', NULL, N_("Generate Joliet directory information"), ONE_DASH },
|
||||
{ {"full-iso9660-filenames", no_argument, NULL, 'l'},
|
||||
|
@ -246,11 +246,11 @@ static const struct ld_option ld_options[] =
|
|||
{ {"allow-leading-dots", no_argument, NULL, 'L'},
|
||||
'L', NULL, N_("Allow iso9660 filenames to start with '.'"), ONE_DASH },
|
||||
{ {"log-file", required_argument, NULL, OPTION_LOG_FILE},
|
||||
'\0', "LOG_FILE", N_("Re-direct messages to LOG_FILE"), ONE_DASH },
|
||||
'\0', N_("LOG_FILE"), N_("Re-direct messages to LOG_FILE"), ONE_DASH },
|
||||
{ {"exclude", required_argument, NULL, 'm'},
|
||||
'm', "GLOBFILE", N_("Exclude file name"), ONE_DASH },
|
||||
'm', N_("GLOBFILE"), N_("Exclude file name"), ONE_DASH },
|
||||
{ {"prev-session", required_argument, NULL, 'M'},
|
||||
'M', "FILE", N_("Set path to previous session to merge"), ONE_DASH },
|
||||
'M', N_("FILE"), N_("Set path to previous session to merge"), ONE_DASH },
|
||||
{ {"omit-version-number", no_argument, NULL, 'N'},
|
||||
'N', NULL, N_("Omit version number from iso9660 filename"), ONE_DASH },
|
||||
{ {"no-split-symlink-components", no_argument, NULL, 0},
|
||||
|
@ -258,13 +258,13 @@ static const struct ld_option ld_options[] =
|
|||
{ {"no-split-symlink-fields", no_argument, NULL, 0},
|
||||
0, NULL, N_("Inhibit splitting symlink fields"), ONE_DASH },
|
||||
{ {"output", required_argument, NULL, 'o'},
|
||||
'o', "FILE", N_("Set output file name"), ONE_DASH },
|
||||
'o', N_("FILE"), N_("Set output file name"), ONE_DASH },
|
||||
{ {"preparer", required_argument, NULL, 'p'},
|
||||
'p', "PREP", N_("Set Volume preparer"), ONE_DASH },
|
||||
'p', N_("PREP"), N_("Set Volume preparer"), ONE_DASH },
|
||||
{ {"print-size", no_argument, NULL, OPTION_PRINT_SIZE},
|
||||
'\0', NULL, N_("Print estimated filesystem size and exit"), ONE_DASH },
|
||||
{ {"publisher", required_argument, NULL, 'P'},
|
||||
'P', "PUB", N_("Set Volume publisher"), ONE_DASH },
|
||||
'P', N_("PUB"), N_("Set Volume publisher"), ONE_DASH },
|
||||
{ {"quiet", no_argument, NULL, OPTION_QUIET},
|
||||
'\0', NULL, N_("Run quietly"), ONE_DASH },
|
||||
{ {"rational-rock", no_argument, NULL, 'r'},
|
||||
|
@ -274,21 +274,21 @@ static const struct ld_option ld_options[] =
|
|||
{ {"split-output", no_argument, NULL, OPTION_SPLIT_OUTPUT},
|
||||
'\0', NULL, N_("Split output into files of approx. 1GB size"), ONE_DASH },
|
||||
{ {"sysid", required_argument, NULL, OPTION_SYSID},
|
||||
'\0', "ID", N_("Set System ID"), ONE_DASH },
|
||||
'\0', N_("ID"), N_("Set System ID"), ONE_DASH },
|
||||
{ {"translation-table", no_argument, NULL, 'T'},
|
||||
'T', NULL, N_("Generate translation tables for systems that don't understand long filenames"), ONE_DASH },
|
||||
{ {"verbose", no_argument, NULL, 'v'},
|
||||
'v', NULL, N_("Verbose"), ONE_DASH },
|
||||
{ {"volid", required_argument, NULL, 'V'},
|
||||
'V', "ID", N_("Set Volume ID"), ONE_DASH },
|
||||
'V', N_("ID"), N_("Set Volume ID"), ONE_DASH },
|
||||
{ {"volset", required_argument, NULL, OPTION_VOLSET},
|
||||
'\0', "ID", N_("Set Volume set ID"), ONE_DASH },
|
||||
'\0', N_("ID"), N_("Set Volume set ID"), ONE_DASH },
|
||||
{ {"volset-size", required_argument, NULL, OPTION_VOLSET_SIZE},
|
||||
'\0', "#", N_("Set Volume set size"), ONE_DASH },
|
||||
{ {"volset-seqno", required_argument, NULL, OPTION_VOLSET_SEQ_NUM},
|
||||
'\0', "#", N_("Set Volume set sequence number"), ONE_DASH },
|
||||
{ {"old-exclude", required_argument, NULL, 'x'},
|
||||
'x', "FILE", N_("Exclude file name (deprecated)"), ONE_DASH },
|
||||
'x', N_("FILE"), N_("Exclude file name (deprecated)"), ONE_DASH },
|
||||
#ifdef ERIC_neverdef
|
||||
{ {"transparent-compression", no_argument, NULL, 'z'},
|
||||
'z', NULL, "Enable transparent compression of files", ONE_DASH },
|
||||
|
@ -481,6 +481,7 @@ void usage(){
|
|||
int comma;
|
||||
int len;
|
||||
unsigned int j;
|
||||
char *arg;
|
||||
|
||||
printf (" ");
|
||||
|
||||
|
@ -502,8 +503,9 @@ void usage(){
|
|||
putchar (' ');
|
||||
++len;
|
||||
}
|
||||
printf ("%s", ld_options[j].arg);
|
||||
len += strlen (ld_options[j].arg);
|
||||
arg = gettext (ld_options[j].arg);
|
||||
printf ("%s", arg);
|
||||
len += strlen (arg);
|
||||
}
|
||||
comma = TRUE;
|
||||
}
|
||||
|
@ -527,8 +529,9 @@ void usage(){
|
|||
+ strlen (ld_options[j].opt.name));
|
||||
if (ld_options[j].arg != NULL)
|
||||
{
|
||||
printf (" %s", ld_options[j].arg);
|
||||
len += 1 + strlen (ld_options[j].arg);
|
||||
arg = gettext (ld_options[j].arg);
|
||||
printf (" %s", arg);
|
||||
len += 1 + strlen (arg);
|
||||
}
|
||||
comma = TRUE;
|
||||
}
|
||||
|
|
398
video/efi_gop.c
Normal file
398
video/efi_gop.c
Normal file
|
@ -0,0 +1,398 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2005,2006,2007,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
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#define grub_video_render_target grub_video_fbrender_target
|
||||
|
||||
#include <grub/err.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/dl.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/video.h>
|
||||
#include <grub/video_fb.h>
|
||||
#include <grub/efi/api.h>
|
||||
#include <grub/efi/efi.h>
|
||||
#include <grub/efi/graphics_output.h>
|
||||
|
||||
static grub_efi_guid_t graphics_output_guid = GRUB_EFI_GOP_GUID;
|
||||
static struct grub_efi_gop *gop;
|
||||
static unsigned old_mode;
|
||||
static int restore_needed;
|
||||
|
||||
static struct
|
||||
{
|
||||
struct grub_video_mode_info mode_info;
|
||||
struct grub_video_render_target *render_target;
|
||||
grub_uint8_t *ptr;
|
||||
} framebuffer;
|
||||
|
||||
|
||||
static int
|
||||
check_protocol (void)
|
||||
{
|
||||
gop = grub_efi_locate_protocol (&graphics_output_guid, 0);
|
||||
if (gop)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_gop_init (void)
|
||||
{
|
||||
grub_memset (&framebuffer, 0, sizeof(framebuffer));
|
||||
return grub_video_fb_init ();
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_gop_fini (void)
|
||||
{
|
||||
if (restore_needed)
|
||||
{
|
||||
efi_call_2 (gop->set_mode, gop, old_mode);
|
||||
restore_needed = 0;
|
||||
}
|
||||
return grub_video_fb_fini ();
|
||||
}
|
||||
|
||||
static int
|
||||
grub_video_gop_get_bpp (struct grub_efi_gop_mode_info *in)
|
||||
{
|
||||
grub_uint32_t total_mask;
|
||||
int i;
|
||||
switch (in->pixel_format)
|
||||
{
|
||||
case GRUB_EFI_GOT_BGRA8:
|
||||
case GRUB_EFI_GOT_RGBA8:
|
||||
return 32;
|
||||
|
||||
case GRUB_EFI_GOT_BITMASK:
|
||||
/* Check overlaps. */
|
||||
if ((in->pixel_bitmask.r & in->pixel_bitmask.g)
|
||||
|| (in->pixel_bitmask.r & in->pixel_bitmask.b)
|
||||
|| (in->pixel_bitmask.g & in->pixel_bitmask.b)
|
||||
|| (in->pixel_bitmask.r & in->pixel_bitmask.a)
|
||||
|| (in->pixel_bitmask.g & in->pixel_bitmask.a)
|
||||
|| (in->pixel_bitmask.b & in->pixel_bitmask.a))
|
||||
return 0;
|
||||
|
||||
total_mask = in->pixel_bitmask.r | in->pixel_bitmask.g
|
||||
| in->pixel_bitmask.b | in->pixel_bitmask.a;
|
||||
|
||||
for (i = 31; i >= 0; i--)
|
||||
if (total_mask & (1 << i))
|
||||
return i + 1;
|
||||
|
||||
/* Fall through. */
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
grub_video_gop_get_bitmask (grub_uint32_t mask, unsigned int *mask_size,
|
||||
unsigned int *field_pos)
|
||||
{
|
||||
int i;
|
||||
int last_p;
|
||||
for (i = 31; i >= 0; i--)
|
||||
if (mask & (1 << i))
|
||||
break;
|
||||
if (i == -1)
|
||||
{
|
||||
*mask_size = *field_pos = 0;
|
||||
return;
|
||||
}
|
||||
last_p = i;
|
||||
for (; i >= 0; i--)
|
||||
if (!(mask & (1 << i)))
|
||||
break;
|
||||
*field_pos = i + 1;
|
||||
*mask_size = last_p - *field_pos;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_gop_fill_mode_info (struct grub_efi_gop_mode_info *in,
|
||||
struct grub_video_mode_info *out)
|
||||
{
|
||||
out->number_of_colors = 256;
|
||||
out->width = in->width;
|
||||
out->height = in->height;
|
||||
out->mode_type = GRUB_VIDEO_MODE_TYPE_RGB;
|
||||
out->bpp = grub_video_gop_get_bpp (in);
|
||||
out->bytes_per_pixel = out->bpp >> 3;
|
||||
if (!out->bpp)
|
||||
return grub_error (GRUB_ERR_IO, "Unsupported video mode");
|
||||
out->pitch = in->pixels_per_scanline * out->bytes_per_pixel;
|
||||
|
||||
switch (in->pixel_format)
|
||||
{
|
||||
case GRUB_EFI_GOT_RGBA8:
|
||||
out->red_mask_size = 8;
|
||||
out->red_field_pos = 0;
|
||||
out->green_mask_size = 8;
|
||||
out->green_field_pos = 8;
|
||||
out->blue_mask_size = 8;
|
||||
out->blue_field_pos = 16;
|
||||
out->reserved_mask_size = 8;
|
||||
out->reserved_field_pos = 24;
|
||||
break;
|
||||
|
||||
case GRUB_EFI_GOT_BGRA8:
|
||||
out->red_mask_size = 8;
|
||||
out->red_field_pos = 16;
|
||||
out->green_mask_size = 8;
|
||||
out->green_field_pos = 8;
|
||||
out->blue_mask_size = 8;
|
||||
out->blue_field_pos = 0;
|
||||
out->reserved_mask_size = 8;
|
||||
out->reserved_field_pos = 24;
|
||||
break;
|
||||
|
||||
case GRUB_EFI_GOT_BITMASK:
|
||||
grub_video_gop_get_bitmask (in->pixel_bitmask.r, &out->red_mask_size,
|
||||
&out->red_field_pos);
|
||||
grub_video_gop_get_bitmask (in->pixel_bitmask.g, &out->green_mask_size,
|
||||
&out->green_field_pos);
|
||||
grub_video_gop_get_bitmask (in->pixel_bitmask.b, &out->blue_mask_size,
|
||||
&out->blue_field_pos);
|
||||
grub_video_gop_get_bitmask (in->pixel_bitmask.a, &out->reserved_mask_size,
|
||||
&out->reserved_field_pos);
|
||||
break;
|
||||
|
||||
default:
|
||||
return grub_error (GRUB_ERR_IO, "Unsupported video mode");
|
||||
}
|
||||
|
||||
out->blit_format = grub_video_get_blit_format (out);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_gop_setup (unsigned int width, unsigned int height,
|
||||
unsigned int mode_type, unsigned int mode_mask __attribute__ ((unused)))
|
||||
{
|
||||
unsigned int depth;
|
||||
struct grub_efi_gop_mode_info *info = NULL;
|
||||
unsigned best_mode = 0;
|
||||
grub_err_t err;
|
||||
unsigned bpp;
|
||||
int found = 0;
|
||||
unsigned long long best_volume = 0;
|
||||
|
||||
depth = (mode_type & GRUB_VIDEO_MODE_TYPE_DEPTH_MASK)
|
||||
>> GRUB_VIDEO_MODE_TYPE_DEPTH_POS;
|
||||
|
||||
/* Keep current mode if possible. */
|
||||
if (gop->mode->info)
|
||||
{
|
||||
bpp = grub_video_gop_get_bpp (gop->mode->info);
|
||||
if (bpp && ((width == gop->mode->info->width
|
||||
&& height == gop->mode->info->height)
|
||||
|| (width == 0 && height == 0))
|
||||
&& (depth == bpp || depth == 0))
|
||||
{
|
||||
grub_dprintf ("video", "GOP: keeping mode %d\n", gop->mode->mode);
|
||||
best_mode = gop->mode->mode;
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
unsigned mode;
|
||||
grub_dprintf ("video", "GOP: %d modes detected\n", gop->mode->max_mode);
|
||||
for (mode = 0; mode < gop->mode->max_mode; mode++)
|
||||
{
|
||||
grub_efi_uintn_t size;
|
||||
grub_efi_status_t status;
|
||||
|
||||
status = efi_call_4 (gop->query_mode, gop, mode, &size, &info);
|
||||
if (status)
|
||||
{
|
||||
info = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
grub_dprintf ("video", "GOP: mode %d: %dx%d\n", mode, info->width,
|
||||
info->height);
|
||||
|
||||
bpp = grub_video_gop_get_bpp (info);
|
||||
if (!bpp)
|
||||
{
|
||||
grub_dprintf ("video", "GOP: mode %d: incompatible pixel mode\n",
|
||||
mode);
|
||||
continue;
|
||||
}
|
||||
|
||||
grub_dprintf ("video", "GOP: mode %d: depth %d\n", mode, bpp);
|
||||
|
||||
if (!(((info->width == width && info->height == height)
|
||||
|| (width == 0 && height == 0))
|
||||
&& (bpp == depth || depth == 0)))
|
||||
{
|
||||
grub_dprintf ("video", "GOP: mode %d: rejected\n", mode);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (best_volume < ((unsigned long long) info->width)
|
||||
* ((unsigned long long) info->height)
|
||||
* ((unsigned long long) bpp))
|
||||
{
|
||||
best_volume = ((unsigned long long) info->width)
|
||||
* ((unsigned long long) info->height)
|
||||
* ((unsigned long long) bpp);
|
||||
best_mode = mode;
|
||||
}
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
grub_dprintf ("video", "GOP: no mode found\n");
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found.");
|
||||
}
|
||||
|
||||
if (best_mode != gop->mode->mode)
|
||||
{
|
||||
if (!restore_needed)
|
||||
{
|
||||
old_mode = gop->mode->mode;
|
||||
restore_needed = 1;
|
||||
}
|
||||
efi_call_2 (gop->set_mode, gop, best_mode);
|
||||
}
|
||||
|
||||
info = gop->mode->info;
|
||||
|
||||
err = grub_video_gop_fill_mode_info (info, &framebuffer.mode_info);
|
||||
if (err)
|
||||
{
|
||||
grub_dprintf ("video", "GOP: couldn't fill mode info\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
framebuffer.ptr = (void *) (grub_addr_t) gop->mode->fb_base;
|
||||
|
||||
grub_dprintf ("video", "GOP: initialising FB @ %p %dx%dx%d\n",
|
||||
framebuffer.ptr, framebuffer.mode_info.width,
|
||||
framebuffer.mode_info.height, framebuffer.mode_info.bpp);
|
||||
|
||||
err = grub_video_fb_create_render_target_from_pointer
|
||||
(&framebuffer.render_target, &framebuffer.mode_info, framebuffer.ptr);
|
||||
|
||||
if (err)
|
||||
{
|
||||
grub_dprintf ("video", "GOP: Couldn't create FB target\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
err = grub_video_fb_set_active_render_target (framebuffer.render_target);
|
||||
|
||||
if (err)
|
||||
{
|
||||
grub_dprintf ("video", "GOP: Couldn't set FB target\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
err = grub_video_fb_set_palette (0, GRUB_VIDEO_FBSTD_NUMCOLORS,
|
||||
grub_video_fbstd_colors);
|
||||
|
||||
if (err)
|
||||
grub_dprintf ("video", "GOP: Couldn't set palette\n");
|
||||
else
|
||||
grub_dprintf ("video", "GOP: Success\n");
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_gop_swap_buffers (void)
|
||||
{
|
||||
/* TODO: Implement buffer swapping. */
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_gop_set_active_render_target (struct grub_video_render_target *target)
|
||||
{
|
||||
if (target == GRUB_VIDEO_RENDER_TARGET_DISPLAY)
|
||||
target = framebuffer.render_target;
|
||||
|
||||
return grub_video_fb_set_active_render_target (target);
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_gop_get_info_and_fini (struct grub_video_mode_info *mode_info,
|
||||
void **framebuf)
|
||||
{
|
||||
grub_memcpy (mode_info, &(framebuffer.mode_info), sizeof (*mode_info));
|
||||
*framebuf = (char *) framebuffer.ptr;
|
||||
|
||||
grub_video_fb_fini ();
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static struct grub_video_adapter grub_video_gop_adapter =
|
||||
{
|
||||
.name = "EFI GOP driver",
|
||||
|
||||
.init = grub_video_gop_init,
|
||||
.fini = grub_video_gop_fini,
|
||||
.setup = grub_video_gop_setup,
|
||||
.get_info = grub_video_fb_get_info,
|
||||
.get_info_and_fini = grub_video_gop_get_info_and_fini,
|
||||
.set_palette = grub_video_fb_set_palette,
|
||||
.get_palette = grub_video_fb_get_palette,
|
||||
.set_viewport = grub_video_fb_set_viewport,
|
||||
.get_viewport = grub_video_fb_get_viewport,
|
||||
.map_color = grub_video_fb_map_color,
|
||||
.map_rgb = grub_video_fb_map_rgb,
|
||||
.map_rgba = grub_video_fb_map_rgba,
|
||||
.unmap_color = grub_video_fb_unmap_color,
|
||||
.fill_rect = grub_video_fb_fill_rect,
|
||||
.blit_bitmap = grub_video_fb_blit_bitmap,
|
||||
.blit_render_target = grub_video_fb_blit_render_target,
|
||||
.scroll = grub_video_fb_scroll,
|
||||
.swap_buffers = grub_video_gop_swap_buffers,
|
||||
.create_render_target = grub_video_fb_create_render_target,
|
||||
.delete_render_target = grub_video_fb_delete_render_target,
|
||||
.set_active_render_target = grub_video_gop_set_active_render_target,
|
||||
.get_active_render_target = grub_video_fb_get_active_render_target,
|
||||
|
||||
.next = 0
|
||||
};
|
||||
|
||||
GRUB_MOD_INIT(efi_gop)
|
||||
{
|
||||
if (check_protocol ())
|
||||
grub_video_register (&grub_video_gop_adapter);
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(efi_gop)
|
||||
{
|
||||
if (restore_needed)
|
||||
{
|
||||
efi_call_2 (gop->set_mode, gop, old_mode);
|
||||
restore_needed = 0;
|
||||
}
|
||||
if (gop)
|
||||
grub_video_unregister (&grub_video_gop_adapter);
|
||||
}
|
|
@ -183,20 +183,20 @@ check_protocol (void)
|
|||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_efi_init (void)
|
||||
grub_video_uga_init (void)
|
||||
{
|
||||
grub_memset (&framebuffer, 0, sizeof(framebuffer));
|
||||
return grub_video_fb_init ();
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_efi_fini (void)
|
||||
grub_video_uga_fini (void)
|
||||
{
|
||||
return grub_video_fb_fini ();
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_efi_setup (unsigned int width, unsigned int height,
|
||||
grub_video_uga_setup (unsigned int width, unsigned int height,
|
||||
unsigned int mode_type, unsigned int mode_mask __attribute__ ((unused)))
|
||||
{
|
||||
unsigned int depth;
|
||||
|
@ -269,14 +269,14 @@ grub_video_efi_setup (unsigned int width, unsigned int height,
|
|||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_efi_swap_buffers (void)
|
||||
grub_video_uga_swap_buffers (void)
|
||||
{
|
||||
/* TODO: Implement buffer swapping. */
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_efi_set_active_render_target (struct grub_video_render_target *target)
|
||||
grub_video_uga_set_active_render_target (struct grub_video_render_target *target)
|
||||
{
|
||||
if (target == GRUB_VIDEO_RENDER_TARGET_DISPLAY)
|
||||
target = framebuffer.render_target;
|
||||
|
@ -285,7 +285,7 @@ grub_video_efi_set_active_render_target (struct grub_video_render_target *target
|
|||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_efi_get_info_and_fini (struct grub_video_mode_info *mode_info,
|
||||
grub_video_uga_get_info_and_fini (struct grub_video_mode_info *mode_info,
|
||||
void **framebuf)
|
||||
{
|
||||
grub_memcpy (mode_info, &(framebuffer.mode_info), sizeof (*mode_info));
|
||||
|
@ -296,15 +296,15 @@ grub_video_efi_get_info_and_fini (struct grub_video_mode_info *mode_info,
|
|||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static struct grub_video_adapter grub_video_efi_adapter =
|
||||
static struct grub_video_adapter grub_video_uga_adapter =
|
||||
{
|
||||
.name = "EFI frame buffer driver",
|
||||
.name = "EFI UGA driver",
|
||||
|
||||
.init = grub_video_efi_init,
|
||||
.fini = grub_video_efi_fini,
|
||||
.setup = grub_video_efi_setup,
|
||||
.init = grub_video_uga_init,
|
||||
.fini = grub_video_uga_fini,
|
||||
.setup = grub_video_uga_setup,
|
||||
.get_info = grub_video_fb_get_info,
|
||||
.get_info_and_fini = grub_video_efi_get_info_and_fini,
|
||||
.get_info_and_fini = grub_video_uga_get_info_and_fini,
|
||||
.set_palette = grub_video_fb_set_palette,
|
||||
.get_palette = grub_video_fb_get_palette,
|
||||
.set_viewport = grub_video_fb_set_viewport,
|
||||
|
@ -317,21 +317,21 @@ static struct grub_video_adapter grub_video_efi_adapter =
|
|||
.blit_bitmap = grub_video_fb_blit_bitmap,
|
||||
.blit_render_target = grub_video_fb_blit_render_target,
|
||||
.scroll = grub_video_fb_scroll,
|
||||
.swap_buffers = grub_video_efi_swap_buffers,
|
||||
.swap_buffers = grub_video_uga_swap_buffers,
|
||||
.create_render_target = grub_video_fb_create_render_target,
|
||||
.delete_render_target = grub_video_fb_delete_render_target,
|
||||
.set_active_render_target = grub_video_efi_set_active_render_target,
|
||||
.set_active_render_target = grub_video_uga_set_active_render_target,
|
||||
.get_active_render_target = grub_video_fb_get_active_render_target,
|
||||
};
|
||||
|
||||
GRUB_MOD_INIT(efi_fb)
|
||||
GRUB_MOD_INIT(efi_uga)
|
||||
{
|
||||
if (check_protocol ())
|
||||
grub_video_register (&grub_video_efi_adapter);
|
||||
grub_video_register (&grub_video_uga_adapter);
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(efi_fb)
|
||||
GRUB_MOD_FINI(efi_uga)
|
||||
{
|
||||
if (uga)
|
||||
grub_video_unregister (&grub_video_efi_adapter);
|
||||
grub_video_unregister (&grub_video_uga_adapter);
|
||||
}
|
Loading…
Reference in a new issue