Merge from trunk.
This commit is contained in:
commit
e4612999e6
31 changed files with 1236 additions and 3811 deletions
|
@ -7,10 +7,12 @@ autom4te.cache
|
||||||
build_env.mk
|
build_env.mk
|
||||||
.bzrignore
|
.bzrignore
|
||||||
config.cache
|
config.cache
|
||||||
|
config.guess
|
||||||
config.h
|
config.h
|
||||||
config.h.in
|
config.h.in
|
||||||
config.log
|
config.log
|
||||||
config.status
|
config.status
|
||||||
|
config.sub
|
||||||
configure
|
configure
|
||||||
conf/*.mk
|
conf/*.mk
|
||||||
conf/gcry.rmk
|
conf/gcry.rmk
|
||||||
|
@ -45,11 +47,13 @@ grub_setup_init.h
|
||||||
*.img
|
*.img
|
||||||
include/grub/cpu
|
include/grub/cpu
|
||||||
include/grub/machine
|
include/grub/machine
|
||||||
|
install-sh
|
||||||
lib/libgcrypt-grub
|
lib/libgcrypt-grub
|
||||||
*.lst
|
*.lst
|
||||||
Makefile
|
Makefile
|
||||||
*.mod
|
*.mod
|
||||||
mod-*.c
|
mod-*.c
|
||||||
|
missing
|
||||||
*.pf2
|
*.pf2
|
||||||
po/*.mo
|
po/*.mo
|
||||||
po/grub.pot
|
po/grub.pot
|
||||||
|
|
105
ChangeLog
105
ChangeLog
|
@ -1,7 +1,94 @@
|
||||||
2009-11-23 Robert Millan <rmh.grub@aybabtu.com>
|
2009-11-25 Yves Blusseau <yves.blusseau@zetam.org>
|
||||||
|
|
||||||
* po/id.po: New file.
|
* configure.ac: move the call to AM_GNU_GETTEXT to avoid warnings when
|
||||||
* LINGUAS: Add `id'.
|
aclocal is run.
|
||||||
|
|
||||||
|
2009-11-25 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* normal/main.c (grub_normal_read_line): Fix off-by-one
|
||||||
|
buffer overflow.
|
||||||
|
|
||||||
|
2009-11-25 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* normal/main.c (grub_normal_execute): Replace "parser.sh" with
|
||||||
|
"parser.grub" in grub_command_execute() call.
|
||||||
|
|
||||||
|
2009-11-24 Carles Pina i Estany <carles@pina.cat>
|
||||||
|
|
||||||
|
* conf/i386-coreboot.rmk (kernel_img_HEADERS): Add i18n.h.
|
||||||
|
* 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.
|
||||||
|
* gettext/gettex.c: Include <grub/i18n.h>.
|
||||||
|
* include/grub/misc.h (grub_gettext_dummy, grub_gettext): Move from
|
||||||
|
here ...
|
||||||
|
* include/grub/i18n.h: ... to here
|
||||||
|
* include/grub/i18n.h: ... to here.
|
||||||
|
* kern/misc.c: Include <grub/i18n.h>
|
||||||
|
(grub_gettext_dummy): Move above user.
|
||||||
|
|
||||||
|
2009-11-24 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* util/Makefile.in (install-local): Convert a `for' into a normal
|
||||||
|
shell expansion.
|
||||||
|
|
||||||
|
2009-11-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* autogen.sh: Add automake call.
|
||||||
|
* config.guess: Remove.
|
||||||
|
* config.sub: Likewise.
|
||||||
|
* install-sh: Likewise.
|
||||||
|
|
||||||
|
2009-11-24 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* util/Makefile.in (install-local): Fix the use of $lang shell variable.
|
||||||
|
|
||||||
|
2009-11-24 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* util/Makefile.in (install-local): Convert a make `$(foreach)'
|
||||||
|
function to a normal shell `for'.
|
||||||
|
|
||||||
|
2009-11-24 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* conf/i386-coreboot.rmk (grub_mkimage_SOURCES): Add `gnulib/progname.c'.
|
||||||
|
|
||||||
|
2009-11-24 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* util/grub-mkrelpath.c: New file.
|
||||||
|
* conf/common.rmk (bin_UTILITIES): Add grub-mkrelpath.
|
||||||
|
(grub_mkrelpath_SOURCES): New variable.
|
||||||
|
* include/grub/util/misc.h: New function prototype.
|
||||||
|
* util/misc.c (make_system_path_relative_to_its_root): New function.
|
||||||
|
|
||||||
|
* util/grub-mkconfig_lib.in (bindir): New variable.
|
||||||
|
(grub_mkrelpath): Likewise.
|
||||||
|
(make_system_path_relative_to_its_root): Use grub-mkrelpath.
|
||||||
|
|
||||||
|
* util/probe.c (probe): Make the file path relative to its root.
|
||||||
|
Change a info message to use the GRUB path. Enable again the
|
||||||
|
check if we can read the file with GRUB facilities.
|
||||||
|
|
||||||
|
* util/i386/pc/grub-setup.c (setup): Make core.img path relative
|
||||||
|
to its root.
|
||||||
|
|
||||||
|
2009-11-24 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* Makefile.in: Don't include GRUB_CONTRIB makefiles with emu
|
||||||
|
platform.
|
||||||
|
|
||||||
|
2009-11-24 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* util/getroot.c (grub_util_get_dev_abstraction): Properly use
|
||||||
|
strncmp().
|
||||||
|
|
||||||
|
2009-11-24 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* util/getroot.c (grub_util_is_dmraid): New function.
|
||||||
|
(grub_util_get_dev_abstraction): Treat dmraid and multipath
|
||||||
|
devices as normal ones, not as LVM.
|
||||||
|
|
||||||
2009-11-23 Carles Pina i Estany <carles@pina.cat>
|
2009-11-23 Carles Pina i Estany <carles@pina.cat>
|
||||||
|
|
||||||
|
@ -17,8 +104,6 @@
|
||||||
* normal/menu_text.c: Include <grub/i18n.h>.
|
* normal/menu_text.c: Include <grub/i18n.h>.
|
||||||
* normal/menu_text.c (print_timeout): Gettexttize string.
|
* normal/menu_text.c (print_timeout): Gettexttize string.
|
||||||
* normal/menu_text.c (print_message): 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
|
* util/grub.d/00_header.in: Define locale_dir and lang. insmod
|
||||||
gettext module and defines locale_dir and lang in grub.cfg.
|
gettext module and defines locale_dir and lang in grub.cfg.
|
||||||
* NEWS: Add gettext support.
|
* NEWS: Add gettext support.
|
||||||
|
@ -221,8 +306,6 @@
|
||||||
* Makefile.in (po/*.po): Redefine as ...
|
* Makefile.in (po/*.po): Redefine as ...
|
||||||
($(foreach lang, $(LINGUAS), po/$(lang).po)): ... this.
|
($(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>
|
2009-11-19 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
* conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/progname.c'.
|
* conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/progname.c'.
|
||||||
|
@ -241,8 +324,6 @@
|
||||||
* util/mkisofs/tree.c: Likewise.
|
* util/mkisofs/tree.c: Likewise.
|
||||||
* util/mkisofs/write.c: Likewise.
|
* util/mkisofs/write.c: Likewise.
|
||||||
|
|
||||||
* po/POTFILES: Update with new files.
|
|
||||||
|
|
||||||
2009-11-18 Robert Millan <rmh.grub@aybabtu.com>
|
2009-11-18 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
* util/mkisofs/eltorito.c: Fix minor mistake in license text.
|
* util/mkisofs/eltorito.c: Fix minor mistake in license text.
|
||||||
|
@ -270,8 +351,6 @@
|
||||||
|
|
||||||
2009-11-18 Robert Millan <rmh.grub@aybabtu.com>
|
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
|
* Makefile.in (po/$(PACKAGE).pot): Process `po/POTFILES-shell' for
|
||||||
translatable Shell files.
|
translatable Shell files.
|
||||||
|
|
||||||
|
@ -282,7 +361,6 @@
|
||||||
2009-11-17 Robert Millan <rmh.grub@aybabtu.com>
|
2009-11-17 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
* INSTALL: Document Automake is needed for bootstrap.
|
* 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.
|
* util/grub.d/10_kfreebsd.in (bindir): New variable.
|
||||||
Add gettext initialization.
|
Add gettext initialization.
|
||||||
(kfreebsd_entry): Make menuentry output translatable.
|
(kfreebsd_entry): Make menuentry output translatable.
|
||||||
|
@ -294,7 +372,6 @@
|
||||||
(po/*.po): Replace `msgmerge' with `$(MSGMERGE)'.
|
(po/*.po): Replace `msgmerge' with `$(MSGMERGE)'.
|
||||||
(po/%.mo): Replace `msgfmt' with `$(MSGFMT)'.
|
(po/%.mo): Replace `msgfmt' with `$(MSGFMT)'.
|
||||||
(LINGUAS): Auto-generate using `po/LINGUAS'.
|
(LINGUAS): Auto-generate using `po/LINGUAS'.
|
||||||
* po/LINGUAS: New file.
|
|
||||||
|
|
||||||
2009-11-17 Robert Millan <rmh.grub@aybabtu.com>
|
2009-11-17 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
@ -334,8 +411,6 @@
|
||||||
(install-local): Install MO files.
|
(install-local): Install MO files.
|
||||||
(po/$(PACKAGE).pot, po/*.po, po/%.mo): New rules.
|
(po/$(PACKAGE).pot, po/*.po, po/%.mo): New rules.
|
||||||
* include/grub/i18n.h: New file.
|
* include/grub/i18n.h: New file.
|
||||||
* po/POTFILES: New file.
|
|
||||||
* po/ca.po: New file.
|
|
||||||
* util/grub.d/10_linux.in (bindir): New variable.
|
* util/grub.d/10_linux.in (bindir): New variable.
|
||||||
Add gettext initialization.
|
Add gettext initialization.
|
||||||
(linux_entry): Make menuentry output translatable.
|
(linux_entry): Make menuentry output translatable.
|
||||||
|
|
15
Makefile.in
15
Makefile.in
|
@ -158,10 +158,9 @@ ifeq ($(platform), emu)
|
||||||
include $(srcdir)/conf/any-emu.mk
|
include $(srcdir)/conf/any-emu.mk
|
||||||
else
|
else
|
||||||
include $(srcdir)/conf/$(target_cpu)-$(platform).mk
|
include $(srcdir)/conf/$(target_cpu)-$(platform).mk
|
||||||
endif
|
|
||||||
|
|
||||||
# For external modules.
|
# For external modules.
|
||||||
-include $(wildcard $(GRUB_CONTRIB)/*/conf/common.mk)
|
-include $(wildcard $(GRUB_CONTRIB)/*/conf/common.mk)
|
||||||
|
endif
|
||||||
|
|
||||||
### General targets.
|
### General targets.
|
||||||
|
|
||||||
|
@ -313,13 +312,13 @@ install-local: all
|
||||||
dest="`echo $$file | sed 's,.*/,,'`"; \
|
dest="`echo $$file | sed 's,.*/,,'`"; \
|
||||||
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
|
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
|
||||||
done
|
done
|
||||||
$(foreach lang, $(LINGUAS), \
|
@langs='$(LINGUAS)'; \
|
||||||
$(shell $(mkinstalldirs) $(DESTDIR)/$(datadir)/locale/$(lang)/LC_MESSAGES) \
|
for lang in $$langs; do \
|
||||||
@list='po/$(lang).mo'; \
|
$(SHELL) $(mkinstalldirs) $(DESTDIR)/$(datadir)/locale/$$lang/LC_MESSAGES; \
|
||||||
for file in $$list; do \
|
file="po/$$lang.mo"; \
|
||||||
if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
|
if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
|
||||||
$(INSTALL_DATA) $$dir$$file $(DESTDIR)/$(datadir)/locale/$(lang)/LC_MESSAGES/$(PACKAGE).mo; \
|
$(INSTALL_DATA) $$dir$$file $(DESTDIR)/$(datadir)/locale/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
|
||||||
done)
|
done
|
||||||
$(SHELL) $(mkinstalldirs) $(DESTDIR)$(infodir)
|
$(SHELL) $(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||||
@list='$(info_INFOS)'; \
|
@list='$(info_INFOS)'; \
|
||||||
for file in $$list; do \
|
for file in $$list; do \
|
||||||
|
|
|
@ -6,6 +6,9 @@ aclocal
|
||||||
autoconf
|
autoconf
|
||||||
autoheader
|
autoheader
|
||||||
|
|
||||||
|
# FIXME: automake doesn't like that there's no Makefile.am
|
||||||
|
automake -a -c -f || true
|
||||||
|
|
||||||
echo timestamp > stamp-h.in
|
echo timestamp > stamp-h.in
|
||||||
|
|
||||||
python util/import_gcry.py lib/libgcrypt/ .
|
python util/import_gcry.py lib/libgcrypt/ .
|
||||||
|
|
|
@ -71,6 +71,10 @@ grub_mkfont_CFLAGS = $(freetype_cflags)
|
||||||
grub_mkfont_LDFLAGS = $(freetype_libs)
|
grub_mkfont_LDFLAGS = $(freetype_libs)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# For grub-mkrelpath.
|
||||||
|
bin_UTILITIES += grub-mkrelpath
|
||||||
|
grub_mkrelpath_SOURCES = util/grub-mkrelpath.c util/misc.c
|
||||||
|
|
||||||
# For the parser.
|
# For the parser.
|
||||||
grub_script.tab.c grub_script.tab.h: script/parser.y
|
grub_script.tab.c grub_script.tab.h: script/parser.y
|
||||||
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/script/parser.y
|
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/script/parser.y
|
||||||
|
|
|
@ -34,7 +34,7 @@ kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||||
machine/boot.h machine/console.h machine/init.h \
|
machine/boot.h machine/console.h machine/init.h \
|
||||||
machine/memory.h machine/loader.h list.h handler.h command.h
|
machine/memory.h machine/loader.h list.h handler.h command.h i18n.h
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR),-Bstatic
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR),-Bstatic
|
||||||
|
@ -53,7 +53,7 @@ boot_img_FORMAT = binary
|
||||||
|
|
||||||
bin_UTILITIES += grub-mkimage
|
bin_UTILITIES += grub-mkimage
|
||||||
grub_mkimage_SOURCES = util/i386/pc/grub-mkimage.c util/misc.c \
|
grub_mkimage_SOURCES = util/i386/pc/grub-mkimage.c util/misc.c \
|
||||||
util/resolve.c
|
util/resolve.c gnulib/progname.c
|
||||||
grub_mkimage_CFLAGS = -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
grub_mkimage_CFLAGS = -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
||||||
|
|
||||||
pkglib_IMAGES += kernel.img
|
pkglib_IMAGES += kernel.img
|
||||||
|
@ -77,7 +77,7 @@ kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||||
machine/boot.h machine/console.h machine/init.h \
|
machine/boot.h machine/console.h machine/init.h \
|
||||||
machine/memory.h machine/loader.h list.h handler.h command.h
|
machine/memory.h machine/loader.h list.h handler.h command.h i18n.h
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)
|
||||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
||||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR)
|
||||||
|
|
|
@ -56,7 +56,7 @@ kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
|
||||||
kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||||
efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h
|
efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h i18n.h
|
||||||
kernel_mod_CFLAGS = $(COMMON_CFLAGS)
|
kernel_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
|
@ -33,7 +33,7 @@ kernel_img_HEADERS = cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||||
ieee1275/ieee1275.h machine/kernel.h machine/loader.h machine/memory.h \
|
ieee1275/ieee1275.h machine/kernel.h machine/loader.h machine/memory.h \
|
||||||
list.h handler.h command.h
|
list.h handler.h command.h i18n.h
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,0x10000,-Bstatic
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,0x10000,-Bstatic
|
||||||
|
|
|
@ -64,7 +64,7 @@ kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||||
machine/biosdisk.h machine/boot.h machine/console.h machine/init.h \
|
machine/biosdisk.h machine/boot.h machine/console.h machine/init.h \
|
||||||
machine/memory.h machine/loader.h machine/vga.h machine/vbe.h \
|
machine/memory.h machine/loader.h machine/vga.h machine/vbe.h \
|
||||||
machine/kernel.h machine/pxe.h i386/pit.h list.h handler.h command.h
|
machine/kernel.h machine/pxe.h i386/pit.h list.h handler.h command.h i18n.h
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS) $(TARGET_IMG_CFLAGS)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS) $(TARGET_IMG_CFLAGS)
|
||||||
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR) $(COMMON_CFLAGS)
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR) $(COMMON_CFLAGS)
|
||||||
|
|
|
@ -17,7 +17,7 @@ kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||||
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h reader.h \
|
env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h reader.h \
|
||||||
symbol.h term.h time.h types.h powerpc/libgcc.h loader.h partition.h \
|
symbol.h term.h time.h types.h powerpc/libgcc.h loader.h partition.h \
|
||||||
msdos_partition.h ieee1275/ieee1275.h machine/kernel.h handler.h list.h \
|
msdos_partition.h ieee1275/ieee1275.h machine/kernel.h handler.h list.h \
|
||||||
command.h
|
command.h i18n.h
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
||||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
|
@ -29,7 +29,7 @@ DEFSYMFILES += kernel_syms.lst
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||||
list.h handler.h command.h \
|
list.h handler.h command.h i18n.h \
|
||||||
sparc64/libgcc.h ieee1275/ieee1275.h machine/kernel.h \
|
sparc64/libgcc.h ieee1275/ieee1275.h machine/kernel.h \
|
||||||
sparc64/ieee1275/ieee1275.h
|
sparc64/ieee1275/ieee1275.h
|
||||||
kernel_img_SOURCES = kern/sparc64/ieee1275/crt0.S kern/ieee1275/cmain.c \
|
kernel_img_SOURCES = kern/sparc64/ieee1275/crt0.S kern/ieee1275/cmain.c \
|
||||||
|
|
|
@ -56,7 +56,7 @@ kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||||
efi/efi.h efi/time.h efi/disk.h machine/loader.h i386/pit.h list.h \
|
efi/efi.h efi/time.h efi/disk.h machine/loader.h i386/pit.h list.h \
|
||||||
handler.h command.h
|
handler.h command.h i18n.h
|
||||||
kernel_mod_CFLAGS = $(COMMON_CFLAGS)
|
kernel_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
1494
config.guess
vendored
1494
config.guess
vendored
File diff suppressed because it is too large
Load diff
1700
config.sub
vendored
1700
config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -33,7 +33,6 @@ dnl type.
|
||||||
|
|
||||||
AC_INIT([GRUB],[1.97],[bug-grub@gnu.org])
|
AC_INIT([GRUB],[1.97],[bug-grub@gnu.org])
|
||||||
AM_INIT_AUTOMAKE()
|
AM_INIT_AUTOMAKE()
|
||||||
AM_GNU_GETTEXT()
|
|
||||||
AC_PREREQ(2.59d)
|
AC_PREREQ(2.59d)
|
||||||
AC_CONFIG_SRCDIR([include/grub/dl.h])
|
AC_CONFIG_SRCDIR([include/grub/dl.h])
|
||||||
AC_CONFIG_HEADER([config.h])
|
AC_CONFIG_HEADER([config.h])
|
||||||
|
@ -173,6 +172,7 @@ AC_PROG_CC
|
||||||
test "x$GCC" = xyes || AC_MSG_ERROR([GCC is required])
|
test "x$GCC" = xyes || AC_MSG_ERROR([GCC is required])
|
||||||
|
|
||||||
AC_GNU_SOURCE
|
AC_GNU_SOURCE
|
||||||
|
AM_GNU_GETTEXT
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
# Identify characteristics of the host architecture.
|
# Identify characteristics of the host architecture.
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <grub/file.h>
|
#include <grub/file.h>
|
||||||
#include <grub/kernel.h>
|
#include <grub/kernel.h>
|
||||||
#include <grub/gzio.h>
|
#include <grub/gzio.h>
|
||||||
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
.mo file information from:
|
.mo file information from:
|
||||||
|
|
|
@ -25,6 +25,10 @@
|
||||||
# define _(str) gettext(str)
|
# define _(str) gettext(str)
|
||||||
#else
|
#else
|
||||||
# define _(str) grub_gettext(str)
|
# define _(str) grub_gettext(str)
|
||||||
|
|
||||||
|
const char *EXPORT_FUNC(grub_gettext_dummy) (const char *s);
|
||||||
|
extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define N_(str) str
|
#define N_(str) str
|
||||||
|
|
|
@ -240,9 +240,6 @@ grub_ssize_t EXPORT_FUNC(grub_utf8_to_ucs4) (grub_uint32_t *dest,
|
||||||
grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,
|
grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,
|
||||||
grub_uint32_t d, grub_uint32_t *r);
|
grub_uint32_t d, grub_uint32_t *r);
|
||||||
|
|
||||||
const char *EXPORT_FUNC(grub_gettext_dummy) (const char *s);
|
|
||||||
extern const char *(*EXPORT_VAR(grub_gettext)) (const char *s);
|
|
||||||
|
|
||||||
#ifdef NEED_ENABLE_EXECUTE_STACK
|
#ifdef NEED_ENABLE_EXECUTE_STACK
|
||||||
void EXPORT_FUNC(__enable_execute_stack) (void *addr);
|
void EXPORT_FUNC(__enable_execute_stack) (void *addr);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2002,2003,2005,2006,2007,2008 Free Software Foundation, Inc.
|
* Copyright (C) 2002,2003,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -76,4 +76,7 @@ grub_int64_t grub_util_get_disk_size (char *name);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
char *make_system_path_relative_to_its_root (const char *path);
|
||||||
|
|
||||||
#endif /* ! GRUB_UTIL_MISC_HEADER */
|
#endif /* ! GRUB_UTIL_MISC_HEADER */
|
||||||
|
|
519
install-sh
519
install-sh
|
@ -1,519 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# install - install a program, script, or datafile
|
|
||||||
|
|
||||||
scriptversion=2006-12-25.00
|
|
||||||
|
|
||||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
|
||||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
|
||||||
# following copyright and license.
|
|
||||||
#
|
|
||||||
# Copyright (C) 1994 X Consortium
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
# of this software and associated documentation files (the "Software"), to
|
|
||||||
# deal in the Software without restriction, including without limitation the
|
|
||||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
# sell copies of the Software, and to permit persons to whom the Software is
|
|
||||||
# furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be included in
|
|
||||||
# all copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
||||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
|
||||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
#
|
|
||||||
# Except as contained in this notice, the name of the X Consortium shall not
|
|
||||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
|
||||||
# ings in this Software without prior written authorization from the X Consor-
|
|
||||||
# tium.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# FSF changes to this file are in the public domain.
|
|
||||||
#
|
|
||||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
|
||||||
# `make' implicit rules from creating a file called install from it
|
|
||||||
# when there is no Makefile.
|
|
||||||
#
|
|
||||||
# This script is compatible with the BSD install script, but was written
|
|
||||||
# from scratch.
|
|
||||||
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
IFS=" "" $nl"
|
|
||||||
|
|
||||||
# set DOITPROG to echo to test this script
|
|
||||||
|
|
||||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
|
||||||
doit=${DOITPROG-}
|
|
||||||
if test -z "$doit"; then
|
|
||||||
doit_exec=exec
|
|
||||||
else
|
|
||||||
doit_exec=$doit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Put in absolute file names if you don't have them in your path;
|
|
||||||
# or use environment vars.
|
|
||||||
|
|
||||||
chgrpprog=${CHGRPPROG-chgrp}
|
|
||||||
chmodprog=${CHMODPROG-chmod}
|
|
||||||
chownprog=${CHOWNPROG-chown}
|
|
||||||
cmpprog=${CMPPROG-cmp}
|
|
||||||
cpprog=${CPPROG-cp}
|
|
||||||
mkdirprog=${MKDIRPROG-mkdir}
|
|
||||||
mvprog=${MVPROG-mv}
|
|
||||||
rmprog=${RMPROG-rm}
|
|
||||||
stripprog=${STRIPPROG-strip}
|
|
||||||
|
|
||||||
posix_glob='?'
|
|
||||||
initialize_posix_glob='
|
|
||||||
test "$posix_glob" != "?" || {
|
|
||||||
if (set -f) 2>/dev/null; then
|
|
||||||
posix_glob=
|
|
||||||
else
|
|
||||||
posix_glob=:
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
'
|
|
||||||
|
|
||||||
posix_mkdir=
|
|
||||||
|
|
||||||
# Desired mode of installed file.
|
|
||||||
mode=0755
|
|
||||||
|
|
||||||
chgrpcmd=
|
|
||||||
chmodcmd=$chmodprog
|
|
||||||
chowncmd=
|
|
||||||
mvcmd=$mvprog
|
|
||||||
rmcmd="$rmprog -f"
|
|
||||||
stripcmd=
|
|
||||||
|
|
||||||
src=
|
|
||||||
dst=
|
|
||||||
dir_arg=
|
|
||||||
dst_arg=
|
|
||||||
|
|
||||||
copy_on_change=false
|
|
||||||
no_target_directory=
|
|
||||||
|
|
||||||
usage="\
|
|
||||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
|
||||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
|
||||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
|
||||||
or: $0 [OPTION]... -d DIRECTORIES...
|
|
||||||
|
|
||||||
In the 1st form, copy SRCFILE to DSTFILE.
|
|
||||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
|
||||||
In the 4th, create DIRECTORIES.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--help display this help and exit.
|
|
||||||
--version display version info and exit.
|
|
||||||
|
|
||||||
-c (ignored)
|
|
||||||
-C install only if different (preserve the last data modification time)
|
|
||||||
-d create directories instead of installing files.
|
|
||||||
-g GROUP $chgrpprog installed files to GROUP.
|
|
||||||
-m MODE $chmodprog installed files to MODE.
|
|
||||||
-o USER $chownprog installed files to USER.
|
|
||||||
-s $stripprog installed files.
|
|
||||||
-t DIRECTORY install into DIRECTORY.
|
|
||||||
-T report an error if DSTFILE is a directory.
|
|
||||||
|
|
||||||
Environment variables override the default commands:
|
|
||||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
|
||||||
RMPROG STRIPPROG
|
|
||||||
"
|
|
||||||
|
|
||||||
while test $# -ne 0; do
|
|
||||||
case $1 in
|
|
||||||
-c) ;;
|
|
||||||
|
|
||||||
-C) copy_on_change=true;;
|
|
||||||
|
|
||||||
-d) dir_arg=true;;
|
|
||||||
|
|
||||||
-g) chgrpcmd="$chgrpprog $2"
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
--help) echo "$usage"; exit $?;;
|
|
||||||
|
|
||||||
-m) mode=$2
|
|
||||||
case $mode in
|
|
||||||
*' '* | *' '* | *'
|
|
||||||
'* | *'*'* | *'?'* | *'['*)
|
|
||||||
echo "$0: invalid mode: $mode" >&2
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-o) chowncmd="$chownprog $2"
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-s) stripcmd=$stripprog;;
|
|
||||||
|
|
||||||
-t) dst_arg=$2
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-T) no_target_directory=true;;
|
|
||||||
|
|
||||||
--version) echo "$0 $scriptversion"; exit $?;;
|
|
||||||
|
|
||||||
--) shift
|
|
||||||
break;;
|
|
||||||
|
|
||||||
-*) echo "$0: invalid option: $1" >&2
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
*) break;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
|
||||||
# When -d is used, all remaining arguments are directories to create.
|
|
||||||
# When -t is used, the destination is already specified.
|
|
||||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
if test -n "$dst_arg"; then
|
|
||||||
# $@ is not empty: it contains at least $arg.
|
|
||||||
set fnord "$@" "$dst_arg"
|
|
||||||
shift # fnord
|
|
||||||
fi
|
|
||||||
shift # arg
|
|
||||||
dst_arg=$arg
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
echo "$0: no input file specified." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# It's OK to call `install-sh -d' without argument.
|
|
||||||
# This can happen when creating conditional directories.
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
trap '(exit $?); exit' 1 2 13 15
|
|
||||||
|
|
||||||
# Set umask so as not to create temps with too-generous modes.
|
|
||||||
# However, 'strip' requires both read and write access to temps.
|
|
||||||
case $mode in
|
|
||||||
# Optimize common cases.
|
|
||||||
*644) cp_umask=133;;
|
|
||||||
*755) cp_umask=22;;
|
|
||||||
|
|
||||||
*[0-7])
|
|
||||||
if test -z "$stripcmd"; then
|
|
||||||
u_plus_rw=
|
|
||||||
else
|
|
||||||
u_plus_rw='% 200'
|
|
||||||
fi
|
|
||||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
|
||||||
*)
|
|
||||||
if test -z "$stripcmd"; then
|
|
||||||
u_plus_rw=
|
|
||||||
else
|
|
||||||
u_plus_rw=,u+rw
|
|
||||||
fi
|
|
||||||
cp_umask=$mode$u_plus_rw;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
for src
|
|
||||||
do
|
|
||||||
# Protect names starting with `-'.
|
|
||||||
case $src in
|
|
||||||
-*) src=./$src;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
dst=$src
|
|
||||||
dstdir=$dst
|
|
||||||
test -d "$dstdir"
|
|
||||||
dstdir_status=$?
|
|
||||||
else
|
|
||||||
|
|
||||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
|
||||||
# might cause directories to be created, which would be especially bad
|
|
||||||
# if $src (and thus $dsttmp) contains '*'.
|
|
||||||
if test ! -f "$src" && test ! -d "$src"; then
|
|
||||||
echo "$0: $src does not exist." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dst_arg"; then
|
|
||||||
echo "$0: no destination specified." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
dst=$dst_arg
|
|
||||||
# Protect names starting with `-'.
|
|
||||||
case $dst in
|
|
||||||
-*) dst=./$dst;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# If destination is a directory, append the input filename; won't work
|
|
||||||
# if double slashes aren't ignored.
|
|
||||||
if test -d "$dst"; then
|
|
||||||
if test -n "$no_target_directory"; then
|
|
||||||
echo "$0: $dst_arg: Is a directory" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
dstdir=$dst
|
|
||||||
dst=$dstdir/`basename "$src"`
|
|
||||||
dstdir_status=0
|
|
||||||
else
|
|
||||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
|
||||||
dstdir=`
|
|
||||||
(dirname "$dst") 2>/dev/null ||
|
|
||||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
|
||||||
X"$dst" : 'X\(//\)[^/]' \| \
|
|
||||||
X"$dst" : 'X\(//\)$' \| \
|
|
||||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
|
||||||
echo X"$dst" |
|
|
||||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
/^X\(\/\/\)[^/].*/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
/^X\(\/\/\)$/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
/^X\(\/\).*/{
|
|
||||||
s//\1/
|
|
||||||
q
|
|
||||||
}
|
|
||||||
s/.*/./; q'
|
|
||||||
`
|
|
||||||
|
|
||||||
test -d "$dstdir"
|
|
||||||
dstdir_status=$?
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
obsolete_mkdir_used=false
|
|
||||||
|
|
||||||
if test $dstdir_status != 0; then
|
|
||||||
case $posix_mkdir in
|
|
||||||
'')
|
|
||||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
|
||||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
|
||||||
umask=`umask`
|
|
||||||
case $stripcmd.$umask in
|
|
||||||
# Optimize common cases.
|
|
||||||
*[2367][2367]) mkdir_umask=$umask;;
|
|
||||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
|
||||||
|
|
||||||
*[0-7])
|
|
||||||
mkdir_umask=`expr $umask + 22 \
|
|
||||||
- $umask % 100 % 40 + $umask % 20 \
|
|
||||||
- $umask % 10 % 4 + $umask % 2
|
|
||||||
`;;
|
|
||||||
*) mkdir_umask=$umask,go-w;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# With -d, create the new directory with the user-specified mode.
|
|
||||||
# Otherwise, rely on $mkdir_umask.
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
mkdir_mode=-m$mode
|
|
||||||
else
|
|
||||||
mkdir_mode=
|
|
||||||
fi
|
|
||||||
|
|
||||||
posix_mkdir=false
|
|
||||||
case $umask in
|
|
||||||
*[123567][0-7][0-7])
|
|
||||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
|
||||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
|
||||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
|
||||||
|
|
||||||
if (umask $mkdir_umask &&
|
|
||||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
if test -z "$dir_arg" || {
|
|
||||||
# Check for POSIX incompatibilities with -m.
|
|
||||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
|
||||||
# other-writeable bit of parent directory when it shouldn't.
|
|
||||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
|
||||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
|
||||||
case $ls_ld_tmpdir in
|
|
||||||
d????-?r-*) different_mode=700;;
|
|
||||||
d????-?--*) different_mode=755;;
|
|
||||||
*) false;;
|
|
||||||
esac &&
|
|
||||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
|
||||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
|
||||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
then posix_mkdir=:
|
|
||||||
fi
|
|
||||||
rmdir "$tmpdir/d" "$tmpdir"
|
|
||||||
else
|
|
||||||
# Remove any dirs left behind by ancient mkdir implementations.
|
|
||||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
|
||||||
fi
|
|
||||||
trap '' 0;;
|
|
||||||
esac;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if
|
|
||||||
$posix_mkdir && (
|
|
||||||
umask $mkdir_umask &&
|
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
|
||||||
)
|
|
||||||
then :
|
|
||||||
else
|
|
||||||
|
|
||||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
|
||||||
# or it failed possibly due to a race condition. Create the
|
|
||||||
# directory the slow way, step by step, checking for races as we go.
|
|
||||||
|
|
||||||
case $dstdir in
|
|
||||||
/*) prefix='/';;
|
|
||||||
-*) prefix='./';;
|
|
||||||
*) prefix='';;
|
|
||||||
esac
|
|
||||||
|
|
||||||
eval "$initialize_posix_glob"
|
|
||||||
|
|
||||||
oIFS=$IFS
|
|
||||||
IFS=/
|
|
||||||
$posix_glob set -f
|
|
||||||
set fnord $dstdir
|
|
||||||
shift
|
|
||||||
$posix_glob set +f
|
|
||||||
IFS=$oIFS
|
|
||||||
|
|
||||||
prefixes=
|
|
||||||
|
|
||||||
for d
|
|
||||||
do
|
|
||||||
test -z "$d" && continue
|
|
||||||
|
|
||||||
prefix=$prefix$d
|
|
||||||
if test -d "$prefix"; then
|
|
||||||
prefixes=
|
|
||||||
else
|
|
||||||
if $posix_mkdir; then
|
|
||||||
(umask=$mkdir_umask &&
|
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
|
||||||
# Don't fail if two instances are running concurrently.
|
|
||||||
test -d "$prefix" || exit 1
|
|
||||||
else
|
|
||||||
case $prefix in
|
|
||||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
|
||||||
*) qprefix=$prefix;;
|
|
||||||
esac
|
|
||||||
prefixes="$prefixes '$qprefix'"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
prefix=$prefix/
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -n "$prefixes"; then
|
|
||||||
# Don't fail if two instances are running concurrently.
|
|
||||||
(umask $mkdir_umask &&
|
|
||||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
|
||||||
test -d "$dstdir" || exit 1
|
|
||||||
obsolete_mkdir_used=true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
|
||||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
|
||||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
|
||||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
|
||||||
else
|
|
||||||
|
|
||||||
# Make a couple of temp file names in the proper directory.
|
|
||||||
dsttmp=$dstdir/_inst.$$_
|
|
||||||
rmtmp=$dstdir/_rm.$$_
|
|
||||||
|
|
||||||
# Trap to clean up those temp files at exit.
|
|
||||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
|
||||||
|
|
||||||
# Copy the file name to the temp name.
|
|
||||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
|
||||||
|
|
||||||
# and set any options; do chmod last to preserve setuid bits.
|
|
||||||
#
|
|
||||||
# If any of these fail, we abort the whole thing. If we want to
|
|
||||||
# ignore errors from any of these, just make sure not to ignore
|
|
||||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
|
||||||
#
|
|
||||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
|
||||||
|
|
||||||
# If -C, don't bother to copy if it wouldn't change the file.
|
|
||||||
if $copy_on_change &&
|
|
||||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
|
||||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
|
||||||
|
|
||||||
eval "$initialize_posix_glob" &&
|
|
||||||
$posix_glob set -f &&
|
|
||||||
set X $old && old=:$2:$4:$5:$6 &&
|
|
||||||
set X $new && new=:$2:$4:$5:$6 &&
|
|
||||||
$posix_glob set +f &&
|
|
||||||
|
|
||||||
test "$old" = "$new" &&
|
|
||||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
rm -f "$dsttmp"
|
|
||||||
else
|
|
||||||
# Rename the file to the real destination.
|
|
||||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
|
||||||
|
|
||||||
# The rename failed, perhaps because mv can't rename something else
|
|
||||||
# to itself, or perhaps because mv is so ancient that it does not
|
|
||||||
# support -f.
|
|
||||||
{
|
|
||||||
# Now remove or move aside any old file at destination location.
|
|
||||||
# We try this two ways since rm can't unlink itself on some
|
|
||||||
# systems and the destination file might be busy for other
|
|
||||||
# reasons. In this case, the final cleanup might fail but the new
|
|
||||||
# file should still install successfully.
|
|
||||||
{
|
|
||||||
test ! -f "$dst" ||
|
|
||||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
|
||||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
|
||||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
|
||||||
} ||
|
|
||||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
|
||||||
(exit 1); exit 1
|
|
||||||
}
|
|
||||||
} &&
|
|
||||||
|
|
||||||
# Now rename the file to the real destination.
|
|
||||||
$doit $mvcmd "$dsttmp" "$dst"
|
|
||||||
}
|
|
||||||
fi || exit 1
|
|
||||||
|
|
||||||
trap '' 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Local variables:
|
|
||||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-end: "$"
|
|
||||||
# End:
|
|
15
kern/misc.c
15
kern/misc.c
|
@ -23,6 +23,7 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <grub/term.h>
|
#include <grub/term.h>
|
||||||
#include <grub/env.h>
|
#include <grub/env.h>
|
||||||
|
#include <grub/i18n.h>
|
||||||
|
|
||||||
static int
|
static int
|
||||||
grub_iswordseparator (int c)
|
grub_iswordseparator (int c)
|
||||||
|
@ -30,6 +31,13 @@ grub_iswordseparator (int c)
|
||||||
return (grub_isspace (c) || c == ',' || c == ';' || c == '|' || c == '&');
|
return (grub_isspace (c) || c == ',' || c == ';' || c == '|' || c == '&');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* grub_gettext_dummy is not translating anything. */
|
||||||
|
const char *
|
||||||
|
grub_gettext_dummy (const char *s)
|
||||||
|
{
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
const char* (*grub_gettext) (const char *s) = grub_gettext_dummy;
|
const char* (*grub_gettext) (const char *s) = grub_gettext_dummy;
|
||||||
|
|
||||||
void *
|
void *
|
||||||
|
@ -982,13 +990,6 @@ grub_utf8_to_ucs4 (grub_uint32_t *dest, grub_size_t destsize,
|
||||||
return p - dest;
|
return p - dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* grub_gettext_dummy is not translating anything. */
|
|
||||||
const char *
|
|
||||||
grub_gettext_dummy (const char *s)
|
|
||||||
{
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Abort GRUB. This function does not return. */
|
/* Abort GRUB. This function does not return. */
|
||||||
void
|
void
|
||||||
grub_abort (void)
|
grub_abort (void)
|
||||||
|
|
|
@ -415,7 +415,7 @@ grub_normal_execute (const char *config, int nested, int batch)
|
||||||
read_command_list ();
|
read_command_list ();
|
||||||
read_fs_list ();
|
read_fs_list ();
|
||||||
read_handler_list ();
|
read_handler_list ();
|
||||||
grub_command_execute ("parser.sh", 0, 0);
|
grub_command_execute ("parser.grub", 0, 0);
|
||||||
|
|
||||||
reader_nested = nested;
|
reader_nested = nested;
|
||||||
|
|
||||||
|
@ -524,7 +524,7 @@ static grub_err_t
|
||||||
grub_normal_read_line (char **line, int cont)
|
grub_normal_read_line (char **line, int cont)
|
||||||
{
|
{
|
||||||
grub_parser_t parser = grub_parser_get_current ();
|
grub_parser_t parser = grub_parser_get_current ();
|
||||||
char prompt[sizeof("> ") - 1 + grub_strlen (parser->name)];
|
char prompt[sizeof("> ") + grub_strlen (parser->name)];
|
||||||
|
|
||||||
grub_sprintf (prompt, "%s> ", parser->name);
|
grub_sprintf (prompt, "%s> ", parser->name);
|
||||||
|
|
||||||
|
|
43
po/ChangeLog
Normal file
43
po/ChangeLog
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
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,2 +1,3 @@
|
||||||
ca
|
ca
|
||||||
id
|
id
|
||||||
|
zh_CN
|
||||||
|
|
832
po/zh_CN.po
Normal file
832
po/zh_CN.po
Normal file
|
@ -0,0 +1,832 @@
|
||||||
|
# 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'"
|
|
@ -460,13 +460,41 @@ grub_guess_root_device (const char *dir)
|
||||||
|
|
||||||
return os_dev;
|
return os_dev;
|
||||||
}
|
}
|
||||||
|
int
|
||||||
|
grub_util_is_dmraid (const char *os_dev)
|
||||||
|
{
|
||||||
|
if (! strncmp (os_dev, "/dev/mapper/nvidia_", 19))
|
||||||
|
return 1;
|
||||||
|
else if (! strncmp (os_dev, "/dev/mapper/isw_", 16))
|
||||||
|
return 1;
|
||||||
|
else if (! strncmp (os_dev, "/dev/mapper/hpt37x_", 19))
|
||||||
|
return 1;
|
||||||
|
else if (! strncmp (os_dev, "/dev/mapper/hpt45x_", 19))
|
||||||
|
return 1;
|
||||||
|
else if (! strncmp (os_dev, "/dev/mapper/via_", 16))
|
||||||
|
return 1;
|
||||||
|
else if (! strncmp (os_dev, "/dev/mapper/lsi_", 16))
|
||||||
|
return 1;
|
||||||
|
else if (! strncmp (os_dev, "/dev/mapper/pdc_", 16))
|
||||||
|
return 1;
|
||||||
|
else if (! strncmp (os_dev, "/dev/mapper/jmicron_", 20))
|
||||||
|
return 1;
|
||||||
|
else if (! strncmp (os_dev, "/dev/mapper/asr_", 16))
|
||||||
|
return 1;
|
||||||
|
else if (! strncmp (os_dev, "/dev/mapper/sil_", 16))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
grub_util_get_dev_abstraction (const char *os_dev UNUSED)
|
grub_util_get_dev_abstraction (const char *os_dev UNUSED)
|
||||||
{
|
{
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
/* Check for LVM. */
|
/* Check for LVM. */
|
||||||
if (!strncmp (os_dev, "/dev/mapper/", 12))
|
if (!strncmp (os_dev, "/dev/mapper/", 12)
|
||||||
|
&& ! grub_util_is_dmraid (os_dev)
|
||||||
|
&& strncmp (os_dev, "/dev/mapper/mpath", 17) != 0)
|
||||||
return GRUB_DEV_ABSTRACTION_LVM;
|
return GRUB_DEV_ABSTRACTION_LVM;
|
||||||
|
|
||||||
/* Check for RAID. */
|
/* Check for RAID. */
|
||||||
|
|
|
@ -20,10 +20,12 @@ prefix=@prefix@
|
||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
datarootdir=@datarootdir@
|
datarootdir=@datarootdir@
|
||||||
datadir=@datadir@
|
datadir=@datadir@
|
||||||
|
bindir=@bindir@
|
||||||
sbindir=@sbindir@
|
sbindir=@sbindir@
|
||||||
pkgdatadir=${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`
|
pkgdatadir=${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`
|
||||||
|
|
||||||
grub_probe=${sbindir}/`echo grub-probe | sed ${transform}`
|
grub_probe=${sbindir}/`echo grub-probe | sed ${transform}`
|
||||||
|
grub_mkrelpath=${bindir}/`echo grub-mkrelpath | sed ${transform}`
|
||||||
|
|
||||||
grub_warn ()
|
grub_warn ()
|
||||||
{
|
{
|
||||||
|
@ -32,49 +34,7 @@ grub_warn ()
|
||||||
|
|
||||||
make_system_path_relative_to_its_root ()
|
make_system_path_relative_to_its_root ()
|
||||||
{
|
{
|
||||||
path=$1
|
path="`${grub_mkrelpath} $1`"
|
||||||
# abort if file doesn't exist
|
|
||||||
if test -e $path ; then : ;else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# canonicalize
|
|
||||||
if path=`readlink -f $path` ; then : ; else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if not a directory, climb up to the directory containing it
|
|
||||||
if test -d $path ; then
|
|
||||||
dir=$path
|
|
||||||
else
|
|
||||||
dir=`echo $path | sed -e "s,/[^/]*$,,g"`
|
|
||||||
fi
|
|
||||||
|
|
||||||
num=`stat -c %d $dir`
|
|
||||||
|
|
||||||
# this loop sets $dir to the root directory of the filesystem we're inspecting
|
|
||||||
while : ; do
|
|
||||||
parent=`readlink -f $dir/..`
|
|
||||||
if [ "x`stat -c %d $parent`" = "x$num" ] ; then : ; else
|
|
||||||
# $parent is another filesystem; we found it.
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [ "x$dir" = "x/" ] ; then
|
|
||||||
# / is our root.
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
dir=$parent
|
|
||||||
done
|
|
||||||
|
|
||||||
# This function never prints trailing slashes (so that its output can be
|
|
||||||
# appended a slash unconditionally). Each slash in $dir is considered a
|
|
||||||
# preceding slash, and therefore the root directory is an empty string.
|
|
||||||
if [ "$dir" = "/" ] ; then
|
|
||||||
dir=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# XXX: This fails if $dir contains ','.
|
|
||||||
path=`echo "$path" | sed -e "s,^$dir,,g"` || return 1
|
|
||||||
|
|
||||||
case "`uname 2>/dev/null`" in
|
case "`uname 2>/dev/null`" in
|
||||||
CYGWIN*)
|
CYGWIN*)
|
||||||
|
|
99
util/grub-mkrelpath.c
Normal file
99
util/grub-mkrelpath.c
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
/* grub-mkrelpath.c - make a system path relative to its root */
|
||||||
|
/*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <grub/util/misc.h>
|
||||||
|
#include <getopt.h>
|
||||||
|
|
||||||
|
static struct option options[] =
|
||||||
|
{
|
||||||
|
{"help", no_argument, 0, 'h'},
|
||||||
|
{"version", no_argument, 0, 'V'},
|
||||||
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
usage (int status)
|
||||||
|
{
|
||||||
|
if (status)
|
||||||
|
fprintf (stderr, "Try ``grub-mkrelpath --help'' for more information.\n");
|
||||||
|
else
|
||||||
|
printf ("\
|
||||||
|
Usage: grub-mkrelpath [OPTIONS] PATH\n\
|
||||||
|
\n\
|
||||||
|
Make a system path relative to it's root.\n\
|
||||||
|
\n\
|
||||||
|
Options:\n\
|
||||||
|
-h, --help display this message and exit\n\
|
||||||
|
-V, --version print version information and exit\n\
|
||||||
|
\n\
|
||||||
|
Report bugs to <%s>.\n", PACKAGE_BUGREPORT);
|
||||||
|
|
||||||
|
exit (status);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main (int argc, char *argv[])
|
||||||
|
{
|
||||||
|
char *argument, *relpath;
|
||||||
|
|
||||||
|
progname = "grub-mkrelpath";
|
||||||
|
|
||||||
|
/* Check for options. */
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
int c = getopt_long (argc, argv, "hV", options, 0);
|
||||||
|
|
||||||
|
if (c == -1)
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
switch (c)
|
||||||
|
{
|
||||||
|
case 'h':
|
||||||
|
usage (0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'V':
|
||||||
|
printf ("%s (%s) %s\n", progname, PACKAGE_NAME, PACKAGE_VERSION);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
usage (1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (optind >= argc)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "No path is specified.\n");
|
||||||
|
usage (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (optind + 1 != argc)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "Unknown extra argument `%s'.\n", argv[optind + 1]);
|
||||||
|
usage (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
argument = argv[optind];
|
||||||
|
|
||||||
|
relpath = make_system_path_relative_to_its_root (argument);
|
||||||
|
printf ("%s\n", relpath);
|
||||||
|
free (relpath);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -235,9 +235,6 @@ probe (const char *path, char *device_name)
|
||||||
|
|
||||||
if (print == PRINT_FS)
|
if (print == PRINT_FS)
|
||||||
{
|
{
|
||||||
/* FIXME: `path' can't be used to read a file via GRUB facilities,
|
|
||||||
because it's not relative to its root. */
|
|
||||||
#if 0
|
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
stat (path, &st);
|
stat (path, &st);
|
||||||
|
@ -247,12 +244,17 @@ probe (const char *path, char *device_name)
|
||||||
/* Regular file. Verify that we can read it properly. */
|
/* Regular file. Verify that we can read it properly. */
|
||||||
|
|
||||||
grub_file_t file;
|
grub_file_t file;
|
||||||
|
char *rel_path;
|
||||||
grub_util_info ("reading %s via OS facilities", path);
|
grub_util_info ("reading %s via OS facilities", path);
|
||||||
filebuf_via_sys = grub_util_read_image (path);
|
filebuf_via_sys = grub_util_read_image (path);
|
||||||
|
|
||||||
grub_util_info ("reading %s via GRUB facilities", path);
|
rel_path = make_system_path_relative_to_its_root (path);
|
||||||
asprintf (&grub_path, "(%s)%s", drive_name, 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);
|
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);
|
filebuf_via_grub = xmalloc (file->size);
|
||||||
grub_file_read (file, filebuf_via_grub, file->size);
|
grub_file_read (file, filebuf_via_grub, file->size);
|
||||||
|
|
||||||
|
@ -261,7 +263,6 @@ probe (const char *path, char *device_name)
|
||||||
if (memcmp (filebuf_via_grub, filebuf_via_sys, file->size))
|
if (memcmp (filebuf_via_grub, filebuf_via_sys, file->size))
|
||||||
grub_util_error ("files differ");
|
grub_util_error ("files differ");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
printf ("%s\n", fs->name);
|
printf ("%s\n", fs->name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ setup (const char *dir,
|
||||||
const char *boot_file, const char *core_file,
|
const char *boot_file, const char *core_file,
|
||||||
const char *root, const char *dest, int must_embed, int force, int fs_probe)
|
const char *root, const char *dest, int must_embed, int force, int fs_probe)
|
||||||
{
|
{
|
||||||
char *boot_path, *core_path, *core_path_dev;
|
char *boot_path, *core_path, *core_path_dev, *core_path_dev_full;
|
||||||
char *boot_img, *core_img;
|
char *boot_img, *core_img;
|
||||||
size_t boot_size, core_size;
|
size_t boot_size, core_size;
|
||||||
grub_uint16_t core_sectors;
|
grub_uint16_t core_sectors;
|
||||||
|
@ -426,7 +426,9 @@ unable_to_embed:
|
||||||
|
|
||||||
/* Make sure that GRUB reads the identical image as the OS. */
|
/* Make sure that GRUB reads the identical image as the OS. */
|
||||||
tmp_img = xmalloc (core_size);
|
tmp_img = xmalloc (core_size);
|
||||||
core_path_dev = grub_util_get_path (dir, core_file);
|
core_path_dev_full = grub_util_get_path (dir, core_file);
|
||||||
|
core_path_dev = make_system_path_relative_to_its_root (core_path_dev_full);
|
||||||
|
free (core_path_dev_full);
|
||||||
|
|
||||||
/* It is a Good Thing to sync two times. */
|
/* It is a Good Thing to sync two times. */
|
||||||
sync ();
|
sync ();
|
||||||
|
|
81
util/misc.c
81
util/misc.c
|
@ -18,10 +18,12 @@
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -447,3 +449,82 @@ fail:
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __MINGW32__ */
|
#endif /* __MINGW32__ */
|
||||||
|
|
||||||
|
/* This function never prints trailing slashes (so that its output
|
||||||
|
can be appended a slash unconditionally). */
|
||||||
|
char *
|
||||||
|
make_system_path_relative_to_its_root (const char *path)
|
||||||
|
{
|
||||||
|
struct stat st;
|
||||||
|
char *p, *buf, *buf2, *buf3;
|
||||||
|
uintptr_t offset = 0;
|
||||||
|
dev_t num;
|
||||||
|
size_t len;
|
||||||
|
|
||||||
|
/* canonicalize. */
|
||||||
|
p = realpath (path, NULL);
|
||||||
|
|
||||||
|
if (p == NULL)
|
||||||
|
{
|
||||||
|
if (errno != EINVAL)
|
||||||
|
grub_util_error ("failed to get realpath of %s", path);
|
||||||
|
else
|
||||||
|
grub_util_error ("realpath not supporting (path, NULL)");
|
||||||
|
}
|
||||||
|
len = strlen (p) + 1;
|
||||||
|
buf = strdup (p);
|
||||||
|
free (p);
|
||||||
|
|
||||||
|
if (stat (buf, &st) < 0)
|
||||||
|
grub_util_error ("can not stat %s: %s", buf, strerror (errno));
|
||||||
|
|
||||||
|
buf2 = strdup (buf);
|
||||||
|
num = st.st_dev;
|
||||||
|
|
||||||
|
/* This loop sets offset to the number of chars of the root
|
||||||
|
directory we're inspecting. */
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
p = strrchr (buf, '/');
|
||||||
|
if (p == NULL)
|
||||||
|
/* This should never happen. */
|
||||||
|
grub_util_error ("FIXME: no / in buf. (make_system_path_relative_to_its_root)");
|
||||||
|
if (p != buf)
|
||||||
|
*p = 0;
|
||||||
|
else
|
||||||
|
*++p = 0;
|
||||||
|
|
||||||
|
if (stat (buf, &st) < 0)
|
||||||
|
grub_util_error ("can not stat %s: %s", buf, strerror (errno));
|
||||||
|
|
||||||
|
/* buf is another filesystem; we found it. */
|
||||||
|
if (st.st_dev != num)
|
||||||
|
break;
|
||||||
|
|
||||||
|
offset = p - buf;
|
||||||
|
/* offset == 1 means root directory. */
|
||||||
|
if (offset == 1)
|
||||||
|
{
|
||||||
|
free (buf);
|
||||||
|
len = strlen (buf2);
|
||||||
|
while (buf2[len - 1] == '/' && len > 1)
|
||||||
|
{
|
||||||
|
buf2[len - 1] = '\0';
|
||||||
|
len--;
|
||||||
|
}
|
||||||
|
return buf2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free (buf);
|
||||||
|
buf3 = strdup (buf2 + offset);
|
||||||
|
free (buf2);
|
||||||
|
|
||||||
|
len = strlen (buf3);
|
||||||
|
while (buf3[len - 1] == '/' && len > 1)
|
||||||
|
{
|
||||||
|
buf3[len - 1] = '\0';
|
||||||
|
len--;
|
||||||
|
}
|
||||||
|
|
||||||
|
return buf3;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue