diff --git a/ChangeLog b/ChangeLog index b2e8ad37b..de12dd0da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,422 @@ +2009-12-11 Robert Millan + + * THANKS: Add David Miller. + +2009-12-11 Vladimir Serbinenko + + libpciaccess support. + + * Makefile.in (LIBPCIACCESS): New variable. + (enable_grub_emu_pci): Likewise. + * conf/any-emu.rmk (grub_emu_SOURCES) [enable_grub_emu_pci]: Add + util/pci.c and commands/lspci.c. + (grub_emu_LDFLAGS) [enable_grub_emu_pci]: Add $(LIBPCIACCESS). + * configure.ac (grub-emu-pci): New option. + * include/grub/i386/pci.h (grub_pci_device_map_range): New function. + (grub_pci_device_unmap_range): Likewise. + * include/grub/pci.h [GRUB_UTIL]: Include grub/pciutils.h. + (grub_pci_device) [!GRUB_UTIL]: New structure. All users updated. + (grub_pci_address_t) [!GRUB_UTIL]: New type. + (grub_pci_device_t) [!GRUB_UTIL]: Likewise. + (grub_pci_get_bus) [!GRUB_UTIL]: New function. + (grub_pci_get_device) [!GRUB_UTIL]: Likewise. + (grub_pci_get_function) [!GRUB_UTIL]: Likewise. + * include/grub/pciutils.h: New file. + * util/pci.c: Likewise. + +2009-12-11 Felix Zielcke + + * util/misc.c: Don't include twice. + +2009-12-10 Felix Zielcke + + * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Show the disk + name in an error message. + (grub_biosdisk_rw): Likewise. + +2009-12-10 Vladimir Serbinenko + + Eliminate NTFS 4Gib barrier. + + * fs/ntfs.c (read_attr): Use grub_disk_addr_t and grub_size_t. + (read_run_data): Likewise. + (grub_ntfs_read_run_list): Likewise. + (grub_ntfs_read_block): Likewise. + (grub_ntfs_iterate_dir): Likewise. + (read_mft): Likewise. + (read_data): Likewise. + Use COM_LOG_LEN. + * fs/ntfscomp.c (read_block): Cast ctx->target_vcn & 0xF to unsigned + to avoid 64-bit division + * include/grub/ntfs.h (COM_LOG_LEN): New definition. + (grub_ntfs_rlst): Use grub_disk_addr_t. + +2009-12-10 Vladimir Serbinenko + + Eliminate grub-fstest 4Gib barrier. + + * util/grub-fstest.c (skip, leng): Use grub_disk_addr_t. + (read_file): Fix error reporting. + +2009-12-10 Vladimir Serbinenko + + Eliminate hexdump 4Gib barrier. + + * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_addr_t. + * lib/arg.c (grub_arg_parse): Use grub_strtoull. + +2009-12-10 Vladimir Serbinenko + + * kern/device.c (grub_device_iterate): Ignore errors during first scan. + Fixes amarsh bug. + +2009-12-09 Bruce Dubbs + + Remove miscellaneous files in distclean target. + + * Makefile.in: Remove docs/{grub.info,version.texi,stamp-vti} + +2009-12-09 Colin Watson + + * util/grub-mkconfig_lib.in: Don't set grub_probe or grub_mkrelpath + if they're already set. This resolves the conflict between my + grub-install change on 2009-10-06 and Felix' change on 2009-11-11, + fixing the --grub-probe option again. + * util/sparc64/ieee1275/grub-install.in: Revert the last piece of my + change on 2009-10-06, so that we now once again source + `${libdir}/grub/grub-mkconfig_lib' after options have been parsed. + +2009-12-08 Robert Millan + + * conf/common.rmk [sparc64-ieee1275] (grub_mkdevicemap_SOURCES): Use + `util/ieee1275/ofpath.c' and `util/ieee1275/devicemap.c' instead of + `util/devicemap.c'. + +2009-12-08 Carles Pina i Estany + + * include/grub/misc.h (grub_printf_): New declaration. + * kern/misc.c (grub_printf_): New definition. + * normal/main.c (grub_normal_reader_init): Use `grub_printf_' and `N_' + instead of `grub_printf' and `_'. + * normal/menu_entry.c (store_completion): Likewise. + (run): Likewise. + (grub_menu_entry_run): Likewise. + * normal/menu_text.c (grub_wait_after_message): Likewise. + (notify_booting): Likewise. + (notify_fallback): Likewise. + (notify_execution_failure): Likewise. + +2009-12-07 Colin Watson + + * configure.ac: Check for vasprintf. + * util/misc.c (asprintf): Move allocation from here ... + (vasprintf): ... to here. New function. + (xasprintf): New function. + * include/grub/util/misc.h (vasprintf, xasprintf): Add + prototypes. + * util/getroot.c (grub_util_get_grub_dev): Use xasprintf. + * util/grub-mkfont.c (write_font): Likewise. + * util/grub-probe.c (probe): Likewise. + * util/hostdisk.c (make_device_name): Likewise. + +2009-12-06 David S. Miller + + * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Recognize + anything even prefixed with 'cdrom' as a cdrom. + +2009-12-06 Felix Zielcke + + * util/misc.c (make_system_path_relative_to_its_root): Correctly cope with + mount points. + +2009-12-05 Carles Pina i Estany + + * gettext/gettext.c: Include `'. Define grub_gettext_msg, + grub_gettext_msg_list. + (grub_gettext_gettranslation_from_position): Return const char * + and not char *. + (grub_gettext_translate): Add the translated strings into a list, + returns from the list if existing there. + (grub_gettext_init_ext): Add \n at the end of grub_dprintf string. + (grub_gettext_delete_list): Delete the list. + (grub_gettext_env_write_lang): Call grub_gettext_delete_list when + lang environment variable is changed. + (GRUB_MOD_FINI): Call grub_gettext_delete_list. + +2009-12-05 Vladimir Serbinenko + + Rename kernel.mod to kernel.img. + + * conf/i386-efi.rmk (pkglib_MODULES): Change kernel.mod to kernel.img. + (kernel_mod_EXPORTS): Rename to ... + (kernel_img_EXPORTS): ... this. + (kernel_mod_SOURCES): Rename to ... + (kernel_img_SOURCES): ... this. + (kernel_mod_HEADERS): Rename to ... + (kernel_img_HEADERS): ... this. All users updated. + (kernel_mod_CFLAGS): Rename to ... + (kernel_img_CFLAGS): ... this. + (kernel_mod_ASFLAGS): Rename to ... + (kernel_img_ASFLAGS): ... this. + (kernel_mod_LDFLAGS): Rename to ... + (kernel_img_LDFLAGS): ... this. + * conf/x86_64-efi.rmk: Likewise. + * util/i386/efi/grub-mkimage.c (read_kernel_module): Rename to ... + (read_kernel_image): ... this. All users updated. + (read_kernel_image): Read "kernel.img" instead of "kernel.mod". + +2009-12-05 Carles Pina i Estany + + * normal/menu_text.c (grub_color_menu_high): Gettexttize string. + (print_spaces): New function. + (grub_print_ucs4): New function. + (getstringwidth): New function. + (print_message_indented): New function. + (print_message): Gettexttize strings using print_message_indented. + (run_menu): Replaces grub_printf by print_spaces and dynamic terminal + width. + (get_entry_number): Gettextize and uses dynamic terminal width. + (notify_booting, notify_fallback, notify_execution_failure): + Gettextize. + * normal/menu_entry.c (store_completion): Cleanup the gettextized + string. + (run): Likewise. + (grub_menu_entry_run): Likewise. + * PO/POTFILES: Add normal/menu_entry.c. + +2009-12-05 Vladimir Serbinenko + + * configure.ac (TARGET_ASFLAGS): Add "-D". + +2009-12-05 Carles Pina i Estany + + * util/grub-install.in: Install gettext .mo files. + * util/grub-mkrescue.in (process_input_dir): Copy gettext .mo files. + +2009-12-05 Carles Pina i Estany + + * gettext/gettext.c (grub_gettext_init_ext): Replace grub_printf with + grub_dprintf. + +2009-12-05 Robert Millan + + * kern/ieee1275/openfw.c (grub_reboot): Disable for i386. The + non-firmware-dependant one in realmode.S takes precedence. + +2009-12-04 Robert Millan + + * commands/halt.c: Replace misc arch-specific headers with + `'. + * commands/reboot.c: Likewise. + * commands/i386/pc/halt.c: Replace `' with + `'. + * conf/i386-coreboot.rmk (kernel_img_HEADERS): Remove `cpu/reboot.h'. + (halt_mod_SOURCES): Move `kern/i386/halt.c' from here ... + (kernel_img_SOURCES): ... to here. + + * include/grub/efi/efi.h (grub_reboot, grub_halt): Remove prototypes. + * include/grub/i386/pc/init.h: Likewise. + * include/grub/powerpc/ieee1275/kernel.h: Likewise. + * include/grub/sparc64/ieee1275/kernel.h: Likewise. + + * include/grub/misc.h (grub_reboot, grub_halt): New prototypes. + + * include/grub/i386/halt.h: Remove. + * include/grub/i386/reboot.h: Likewise. + + * kern/i386/halt.c: Remove `'. + +2009-12-03 David S. Miller + + * conf/sparc64-ieee1275.rmk (grub_mkimage_SOURCES, + grub_setup_SOURCES, grub_ofpathname_SOURCES): Add gnulib/progname.c + * util/sparc64/ieee1275/grub-mkimage.c: Include and + "progname.h" + * util/sparc64/ieee1275/grub-ofpathname.c: Likewise. + * util/sparc64/ieee1275/grub-setup.c: Likewise. + (usage): Add missing comma in printf. + +2009-12-02 Robert Millan + + Use the same reboot approach on i386 coreboot and qemu as we do on + BIOS. + + * conf/i386-coreboot.rmk (kernel_img_HEADERS): Add `cpu/reboot.h'. + (reboot_mod_SOURCES): Remove `kern/i386/reboot.c'. + * kern/i386/reboot.c: Remove. + * include/grub/i386/reboot.h (grub_reboot): Export function. + * kern/i386/pc/startup.S (grub_reboot): Move from here ... + * kern/i386/realmode.S (grub_reboot): ... to here. Jump to + 0xf000:0xfff0 instead of 0xffff:0x0000. + [!GRUB_MACHINE_PCBIOS] (prot_to_real): Do not restore interrupts. + * kern/i386/qemu/startup.S: Include `"../realmode.S"'. + +2009-11-30 Robert Millan + + Fix $srcdir != $objdir build. + + * Makefile.in (po/%.po): Rewrite as ... + ($(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po)): ... this. + +2009-11-29 Samuel Thibault + + 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 + + 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 + + * 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 + + 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 + + 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 + + * po/README: New file. Explain our PO file workflow. + +2009-11-27 Robert Millan + + * 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 + + * 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 + + * util/i386/efi/grub-mkimage.c: Include "progname.h". + (main): Use `program_name' instead of nonexistent `progname'. + +2009-11-26 Felix Zielcke + + * 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 + + * conf/i386-coreboot.rmk: Cleanup stale filenames from my previous + commit. + * conf/i386-efi.rmk: Likewise. + * conf/i386-ieee1275.rmk: Likewise. + * conf/powerpc-ieee1275.rmk: Likewise. + * conf/sparc64-ieee1275.rmk: Likewise. + * conf/x86_64-efi.rmk: Likewise. + +2009-11-26 Felix Zielcke + + * conf/any-emu.rmk (grub_emu_SOURCES): Add `gnulib/progname.c'. + +2009-11-26 Felix Zielcke + + * conf/any-emu.rmk (grub_mkfont_SOURCES): Add `gnulib/progname.c'. + +2009-11-26 Robert Millan + + * conf/common.rmk (sbin_UTILITIES): Add `grub-mkdevicemap'. + (grub_mkdevicemap_SOURCES): New variable. + (grub_probe_SOURCES, grub_fstest_SOURCES, grub_mkfont_SOURCES) + (grub_mkrelpath_SOURCES, grub_editenv_SOURCES) + (grub_pe2elf_SOURCES): Add `gnulib/progname.c'. + * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-mkdevicemap'. + (grub_mkdevicemap_SOURCES): Remove. + * conf/i386-efi.rmk: Likewise. + * conf/i386-ieee1275.rmk: Likewise. + * conf/i386-pc.rmk: Likewise. + * conf/powerpc-ieee1275.rmk: Likewise. + * conf/sparc64-ieee1275.rmk: Likewise. + * conf/x86_64-efi.rmk: Likewise. + * util/elf/grub-mkimage.c: Include `' and `"progname.h"'. + (usage): Fix strings to use `program_name'. + (main): Initialize gettext. + * util/grub-editenv.c: Likewise. + * util/grub-emu.c: Likewise. + * util/grub-fstest.c: Likewise. + * util/grub-mkdevicemap.c: Likewise. + * util/grub-mkfont.c: Likewise. + * util/grub-mkrelpath.c: Likewise. + * util/grub-pe2elf.c: Likewise. + * util/grub-probe.c: Likewise. + * util/sparc64/ieee1275/grub-mkimage.c: Likewise. + * util/sparc64/ieee1275/grub-ofpathname.c: Likewise. + * util/sparc64/ieee1275/grub-setup.c: Likewise. + + * util/misc.c: Include `"progname.h"'. + (progname): Remove variable. + (grub_util_warn, grub_util_info, grub_util_error): Use `program_name'. + +2009-11-25 Felix Zielcke + + * util/grub.d/10_linux.in (linux_entry): Quote the arguments to + printf and print a newline after the menuentry header line. + * util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise. + +2009-11-25 Felix Zielcke + + autoconf >= 2.60 support $(localedir). + + * INSTALL: Note that autoconf 2.60 is required. + * configure.ac (AC_PREREQ): Bump to 2.60. + * util/grub.d/10_kfreebsd.in (TEXTDOMAINDIR): Set to lowercased @localedir@. + * util/grub.d/10_linux.in (TEXTDOMAINDIR): Likewise. + 2009-11-25 Yves Blusseau * configure.ac: move the call to AM_GNU_GETTEXT to avoid warnings when @@ -104,6 +523,8 @@ * normal/menu_text.c: Include . * 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. @@ -306,6 +727,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 * conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/progname.c'. @@ -324,6 +747,8 @@ * util/mkisofs/tree.c: Likewise. * util/mkisofs/write.c: Likewise. + * po/POTFILES: Update with new files. + 2009-11-18 Robert Millan * util/mkisofs/eltorito.c: Fix minor mistake in license text. @@ -351,6 +776,8 @@ 2009-11-18 Robert Millan + * 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. @@ -361,6 +788,7 @@ 2009-11-17 Robert Millan * 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. @@ -372,6 +800,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 @@ -411,6 +840,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. diff --git a/INSTALL b/INSTALL index e7f9e8936..cfade2026 100644 --- a/INSTALL +++ b/INSTALL @@ -22,7 +22,7 @@ need the following. * Ruby 1.6 or later * Python 2.5.2 or later -* Autoconf 2.59d or later +* Autoconf 2.60 or later * Automake 1.10.1 or later Configuring the GRUB diff --git a/Makefile.in b/Makefile.in index 7678ceee0..672cd3889 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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@ @@ -107,11 +109,13 @@ endif AWK = @AWK@ LIBCURSES = @LIBCURSES@ LIBUSB = @LIBUSB@ +LIBPCIACCESS = @LIBPCIACCESS@ YACC = @YACC@ FONT_SOURCE = @FONT_SOURCE@ # Options. enable_grub_emu_usb = @enable_grub_emu_usb@ +enable_grub_emu_pci = @enable_grub_emu_pci@ enable_grub_fstest = @enable_grub_fstest@ enable_grub_pe2elf = @enable_grub_pe2elf@ enable_grub_mkfont = @enable_grub_mkfont@ @@ -137,7 +141,9 @@ CLEANFILES = MOSTLYCLEANFILES = DISTCLEANFILES = config.status config.cache config.log config.h \ Makefile stamp-h include/grub/cpu include/grub/machine \ - gensymlist.sh genkernsyms.sh build_env.mk + gensymlist.sh genkernsyms.sh build_env.mk \ + docs/grub.info docs/version.texi docs/stamp-vti + MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES)) \ $(srcdir)/DISTLIST $(srcdir)/config.h.in $(srcdir)/stamp-h.in $(INFOS) diff --git a/THANKS b/THANKS index 5ce190944..82b4bc838 100644 --- a/THANKS +++ b/THANKS @@ -8,6 +8,7 @@ generally assist in the GRUB 2 maintainership process: Andrey Shuvikov Bibo Mao +David Miller Guillem Jover Harley D. Eades III Hitoshi Ozeki diff --git a/bus/pci.c b/bus/pci.c index 2c29c03ab..fe4cad181 100644 --- a/bus/pci.c +++ b/bus/pci.c @@ -21,41 +21,40 @@ #include grub_pci_address_t -grub_pci_make_address (int bus, int device, int function, int reg) +grub_pci_make_address (grub_pci_device_t dev, int reg) { - return (1 << 31) | (bus << 16) | (device << 11) | (function << 8) | (reg << 2); + return (1 << 31) | (dev.bus << 16) | (dev.device << 11) + | (dev.function << 8) | (reg << 2); } void grub_pci_iterate (grub_pci_iteratefunc_t hook) { - int bus; - int dev; - int func; + grub_pci_device_t dev; grub_pci_address_t addr; grub_pci_id_t id; grub_uint32_t hdr; - for (bus = 0; bus < 256; bus++) + for (dev.bus = 0; dev.bus < 256; dev.bus++) { - for (dev = 0; dev < 32; dev++) + for (dev.device = 0; dev.device < 32; dev.device++) { - for (func = 0; func < 8; func++) + for (dev.function = 0; dev.function < 8; dev.function++) { - addr = grub_pci_make_address (bus, dev, func, 0); + addr = grub_pci_make_address (dev, 0); id = grub_pci_read (addr); /* Check if there is a device present. */ if (id >> 16 == 0xFFFF) continue; - if (hook (bus, dev, func, id)) + if (hook (dev, id)) return; /* Probe only func = 0 if the device if not multifunction */ - if (func == 0) + if (dev.function == 0) { - addr = grub_pci_make_address (bus, dev, func, 3); + addr = grub_pci_make_address (dev, 3); hdr = grub_pci_read (addr); if (!(hdr & 0x800000)) break; diff --git a/bus/usb/ohci.c b/bus/usb/ohci.c index 32fb7cf91..5fe9c9507 100644 --- a/bus/usb/ohci.c +++ b/bus/usb/ohci.c @@ -113,7 +113,7 @@ grub_ohci_writereg32 (struct grub_ohci *o, /* Iterate over all PCI devices. Determine if a device is an OHCI controller. If this is the case, initialize it. */ static int NESTED_FUNC_ATTR -grub_ohci_pci_iter (int bus, int device, int func, +grub_ohci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid __attribute__((unused))) { grub_uint32_t class_code; @@ -126,7 +126,7 @@ grub_ohci_pci_iter (int bus, int device, int func, grub_uint32_t revision; grub_uint32_t frame_interval; - addr = grub_pci_make_address (bus, device, func, 2); + addr = grub_pci_make_address (dev, 2); class_code = grub_pci_read (addr) >> 8; interf = class_code & 0xFF; @@ -138,7 +138,7 @@ grub_ohci_pci_iter (int bus, int device, int func, return 0; /* Determine IO base address. */ - addr = grub_pci_make_address (bus, device, func, 4); + addr = grub_pci_make_address (dev, 4); base = grub_pci_read (addr); #if 0 diff --git a/bus/usb/uhci.c b/bus/usb/uhci.c index 88ff5b3d8..0d3daa5f1 100644 --- a/bus/usb/uhci.c +++ b/bus/usb/uhci.c @@ -138,7 +138,7 @@ grub_uhci_portstatus (grub_usb_controller_t dev, /* Iterate over all PCI devices. Determine if a device is an UHCI controller. If this is the case, initialize it. */ static int NESTED_FUNC_ATTR -grub_uhci_pci_iter (int bus, int device, int func, +grub_uhci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid __attribute__((unused))) { grub_uint32_t class_code; @@ -151,7 +151,7 @@ grub_uhci_pci_iter (int bus, int device, int func, struct grub_uhci *u; int i; - addr = grub_pci_make_address (bus, device, func, 2); + addr = grub_pci_make_address (dev, 2); class_code = grub_pci_read (addr) >> 8; interf = class_code & 0xFF; @@ -163,7 +163,7 @@ grub_uhci_pci_iter (int bus, int device, int func, return 0; /* Determine IO base address. */ - addr = grub_pci_make_address (bus, device, func, 8); + addr = grub_pci_make_address (dev, 8); base = grub_pci_read (addr); /* Stop if there is no IO space base address defined. */ if (! (base & 1)) diff --git a/commands/efi/fixvideo.c b/commands/efi/fixvideo.c index f97d83787..685662237 100644 --- a/commands/efi/fixvideo.c +++ b/commands/efi/fixvideo.c @@ -38,11 +38,11 @@ static struct grub_video_patch }; static int NESTED_FUNC_ATTR -scan_card (int bus, int dev, int func, grub_pci_id_t pciid) +scan_card (grub_pci_device_t dev, grub_pci_id_t pciid) { grub_pci_address_t addr; - addr = grub_pci_make_address (bus, dev, func, 2); + addr = grub_pci_make_address (dev, 2); if (grub_pci_read_byte (addr + 3) == 0x3) { struct grub_video_patch *p = video_patches; diff --git a/commands/efi/loadbios.c b/commands/efi/loadbios.c index 9967bb122..23586b269 100644 --- a/commands/efi/loadbios.c +++ b/commands/efi/loadbios.c @@ -41,6 +41,7 @@ enable_rom_area (void) { grub_pci_address_t addr; grub_uint32_t *rom_ptr; + grub_pci_device_t dev = { .bus = 0, .device = 0, .function = 0}; rom_ptr = (grub_uint32_t *) VBIOS_ADDR; if (*rom_ptr != BLANK_MEM) @@ -49,7 +50,7 @@ enable_rom_area (void) return 0; } - addr = grub_pci_make_address (0, 0, 0, 36); + addr = grub_pci_make_address (dev, 36); grub_pci_write_byte (addr++, 0x30); grub_pci_write_byte (addr++, 0x33); grub_pci_write_byte (addr++, 0x33); @@ -73,8 +74,9 @@ static void lock_rom_area (void) { grub_pci_address_t addr; + grub_pci_device_t dev = { .bus = 0, .device = 0, .function = 0}; - addr = grub_pci_make_address (0, 0, 0, 36); + addr = grub_pci_make_address (dev, 36); grub_pci_write_byte (addr++, 0x10); grub_pci_write_byte (addr++, 0x11); grub_pci_write_byte (addr++, 0x11); diff --git a/commands/halt.c b/commands/halt.c index 9a42938b4..8fa8db5be 100644 --- a/commands/halt.c +++ b/commands/halt.c @@ -19,15 +19,7 @@ #include #include - -#if defined(GRUB_MACHINE_IEEE1275) -#include -#elif defined(GRUB_MACHINE_EFI) -#include -#else -/* Platforms shipping standalone halt, such as coreboot. */ -#include -#endif +#include static grub_err_t grub_cmd_halt (grub_command_t cmd __attribute__ ((unused)), diff --git a/commands/hexdump.c b/commands/hexdump.c index f59ba363c..4b3e3ef29 100644 --- a/commands/hexdump.c +++ b/commands/hexdump.c @@ -38,18 +38,18 @@ grub_cmd_hexdump (grub_extcmd_t cmd, int argc, char **args) struct grub_arg_list *state = cmd->state; char buf[GRUB_DISK_SECTOR_SIZE * 4]; grub_ssize_t size, length; - grub_addr_t skip; + grub_disk_addr_t skip; int namelen; if (argc != 1) return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required"); namelen = grub_strlen (args[0]); - skip = (state[0].set) ? grub_strtoul (state[0].arg, 0, 0) : 0; + skip = (state[0].set) ? grub_strtoull (state[0].arg, 0, 0) : 0; length = (state[1].set) ? grub_strtoul (state[1].arg, 0, 0) : 256; if (!grub_strcmp (args[0], "(mem)")) - hexdump (skip, (char *) skip, length); + hexdump (skip, (char *) (grub_addr_t) skip, length); else if ((args[0][0] == '(') && (args[0][namelen - 1] == ')')) { grub_disk_t disk; diff --git a/commands/i386/pc/halt.c b/commands/i386/pc/halt.c index add8631a8..344dcecd8 100644 --- a/commands/i386/pc/halt.c +++ b/commands/i386/pc/halt.c @@ -18,7 +18,7 @@ */ #include -#include +#include #include static const struct grub_arg_option options[] = diff --git a/commands/lspci.c b/commands/lspci.c index 5b3360a37..bcaafa4f8 100644 --- a/commands/lspci.c +++ b/commands/lspci.c @@ -115,15 +115,16 @@ grub_pci_get_class (int class, int subclass) } static int NESTED_FUNC_ATTR -grub_lspci_iter (int bus, int dev, int func, grub_pci_id_t pciid) +grub_lspci_iter (grub_pci_device_t dev, grub_pci_id_t pciid) { grub_uint32_t class; const char *sclass; grub_pci_address_t addr; - grub_printf ("%02x:%02x.%x %04x:%04x", bus, dev, func, pciid & 0xFFFF, - pciid >> 16); - addr = grub_pci_make_address (bus, dev, func, 2); + grub_printf ("%02x:%02x.%x %04x:%04x", grub_pci_get_bus (dev), + grub_pci_get_device (dev), grub_pci_get_function (dev), + pciid & 0xFFFF, pciid >> 16); + addr = grub_pci_make_address (dev, 2); class = grub_pci_read (addr); /* Lookup the class name, if there isn't a specific one, @@ -156,13 +157,13 @@ grub_cmd_lspci (grub_command_t cmd __attribute__ ((unused)), static grub_command_t cmd; -GRUB_MOD_INIT(pci) +GRUB_MOD_INIT(lspci) { cmd = grub_register_command ("lspci", grub_cmd_lspci, 0, "List PCI devices"); } -GRUB_MOD_FINI(pci) +GRUB_MOD_FINI(lspci) { grub_unregister_command (cmd); } diff --git a/commands/reboot.c b/commands/reboot.c index 0b553b710..86c9e2dd9 100644 --- a/commands/reboot.c +++ b/commands/reboot.c @@ -19,18 +19,7 @@ #include #include - -#if defined(GRUB_MACHINE_IEEE1275) -#include -#elif defined(GRUB_MACHINE_EFI) -#include -#elif defined(GRUB_MACHINE_PCBIOS) -#include -#else -/* Platforms shipping standalone reboot, such as coreboot. */ -#include -#endif - +#include static grub_err_t grub_cmd_reboot (grub_command_t cmd __attribute__ ((unused)), diff --git a/conf/any-emu.rmk b/conf/any-emu.rmk index c95849742..c7b2e014c 100644 --- a/conf/any-emu.rmk +++ b/conf/any-emu.rmk @@ -16,7 +16,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ commands/gptsync.c commands/probe.c commands/xnu_uuid.c \ commands/password.c commands/keystatus.c \ disk/host.c disk/loopback.c disk/scsi.c \ - fs/fshelp.c \ + fs/fshelp.c \ \ io/gzio.c \ kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c \ @@ -30,7 +30,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ normal/completion.c normal/main.c normal/color.c \ normal/menu.c normal/menu_entry.c normal/menu_viewer.c \ normal/menu_text.c \ - script/main.c script/execute.c script/function.c \ + script/main.c script/execute.c script/function.c \ script/lexer.c script/script.c grub_script.tab.c \ partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \ partmap/acorn.c partmap/gpt.c \ @@ -39,7 +39,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \ fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c \ - fs/befs.c fs/befs_be.c fs/tar.c \ + fs/befs.c fs/befs_be.c fs/tar.c \ \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ @@ -47,7 +47,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ commands/parttool.c parttool/msdospart.c \ - grub_emu_init.c + grub_emu_init.c gnulib/progname.c ifeq ($(target_cpu), i386) grub_emu_SOURCES += commands/i386/cpuid.c @@ -61,6 +61,11 @@ grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c \ grub_emu_LDFLAGS += $(LIBCURSES) $(LIBUSB) endif +ifeq ($(enable_grub_emu_pci), yes) +grub_emu_SOURCES += util/pci.c commands/lspci.c +grub_emu_LDFLAGS += $(LIBPCIACCESS) +endif + grub_emu_init.lst: geninit.sh $(filter-out grub_emu_init.c,$(grub_emu_SOURCES)) rm -f $@; grep GRUB_MOD_INIT $(filter %.c,$^) /dev/null > $@ DISTCLEANFILES += grub_emu_init.lst @@ -81,7 +86,7 @@ DISTCLEANFILES += grub_emu_init.c # For grub-mkfont. ifeq ($(enable_grub_mkfont), yes) bin_UTILITIES += grub-mkfont -grub_mkfont_SOURCES = util/grub-mkfont.c util/misc.c +grub_mkfont_SOURCES = gnulib/progname.c util/grub-mkfont.c util/misc.c grub_mkfont_CFLAGS = $(freetype_cflags) grub_mkfont_LDFLAGS = $(freetype_libs) endif diff --git a/conf/common.rmk b/conf/common.rmk index 5a9ab2f02..16b4b3451 100644 --- a/conf/common.rmk +++ b/conf/common.rmk @@ -1,15 +1,27 @@ # -*- makefile -*- +sbin_UTILITIES += grub-mkdevicemap +grub_mkdevicemap_SOURCES = gnulib/progname.c util/grub-mkdevicemap.c \ + util/deviceiter.c \ + util/misc.c + +ifeq ($(target_cpu)-$(platform), sparc64-ieee1275) +grub_mkdevicemap_SOURCES += util/ieee1275/ofpath.c util/ieee1275/devicemap.c +else +grub_mkdevicemap_SOURCES += util/devicemap.c +endif + # For grub-mkelfimage. bin_UTILITIES += grub-mkelfimage -grub_mkelfimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \ +grub_mkelfimage_SOURCES = gnulib/progname.c \ + util/elf/grub-mkimage.c util/misc.c \ util/resolve.c util/elf/grub-mkimage.c_DEPENDENCIES = Makefile # For grub-probe. sbin_UTILITIES += grub-probe util/grub-probe.c_DEPENDENCIES = grub_probe_init.h -grub_probe_SOURCES = util/grub-probe.c \ +grub_probe_SOURCES = gnulib/progname.c util/grub-probe.c \ util/hostdisk.c util/misc.c util/getroot.c \ kern/device.c kern/disk.c kern/err.c kern/misc.c \ kern/parser.c kern/partition.c kern/file.c \ @@ -44,7 +56,8 @@ grub_mkisofs_CFLAGS = -D_FILE_OFFSET_BITS=64 \ # For grub-fstest. util/grub-fstest.c_DEPENDENCIES = grub_fstest_init.h -grub_fstest_SOURCES = util/grub-fstest.c util/hostfs.c util/misc.c \ +grub_fstest_SOURCES = gnulib/progname.c util/grub-fstest.c util/hostfs.c \ + util/misc.c \ kern/file.c kern/device.c kern/disk.c kern/err.c kern/misc.c \ disk/host.c disk/loopback.c kern/list.c kern/command.c \ lib/arg.c commands/extcmd.c normal/datetime.c normal/misc.c \ @@ -66,14 +79,14 @@ grub_fstest_SOURCES = util/grub-fstest.c util/hostfs.c util/misc.c \ # For grub-mkfont. ifeq ($(enable_grub_mkfont), yes) bin_UTILITIES += grub-mkfont -grub_mkfont_SOURCES = util/grub-mkfont.c util/misc.c +grub_mkfont_SOURCES = gnulib/progname.c util/grub-mkfont.c util/misc.c grub_mkfont_CFLAGS = $(freetype_cflags) grub_mkfont_LDFLAGS = $(freetype_libs) endif # For grub-mkrelpath. bin_UTILITIES += grub-mkrelpath -grub_mkrelpath_SOURCES = util/grub-mkrelpath.c util/misc.c +grub_mkrelpath_SOURCES = gnulib/progname.c util/grub-mkrelpath.c util/misc.c # For the parser. grub_script.tab.c grub_script.tab.h: script/parser.y @@ -121,7 +134,7 @@ DISTCLEANFILES += grub_fstest_init.c # for grub-editenv bin_UTILITIES += grub-editenv -grub_editenv_SOURCES = util/grub-editenv.c lib/envblk.c util/misc.c kern/misc.c kern/err.c +grub_editenv_SOURCES = gnulib/progname.c util/grub-editenv.c lib/envblk.c util/misc.c kern/misc.c kern/err.c CLEANFILES += grub-editenv # Needed for genmk.rb to work @@ -129,7 +142,7 @@ ifeq (0,1) bin_UTILITIES += grub-macho2img grub-pe2elf endif -grub_pe2elf_SOURCES = util/grub-pe2elf.c util/misc.c +grub_pe2elf_SOURCES = gnulib/progname.c util/grub-pe2elf.c util/misc.c CLEANFILES += grub-pe2elf grub_macho2img_SOURCES = util/grub-macho2img.c diff --git a/conf/i386-coreboot.rmk b/conf/i386-coreboot.rmk index 2a9073ef5..e597328e7 100644 --- a/conf/i386-coreboot.rmk +++ b/conf/i386-coreboot.rmk @@ -18,6 +18,7 @@ kernel_img_SOURCES = kern/i386/coreboot/startup.S \ kern/i386/misc.S \ kern/i386/coreboot/init.c \ kern/i386/multiboot_mmap.c \ + kern/i386/halt.c \ kern/main.c kern/device.c \ kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \ kern/misc.c kern/mm.c kern/reader.c kern/term.c \ @@ -61,6 +62,7 @@ kernel_img_SOURCES = kern/i386/qemu/startup.S \ kern/i386/misc.S \ kern/i386/coreboot/init.c \ kern/i386/qemu/mmap.c \ + kern/i386/halt.c \ kern/main.c kern/device.c \ kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \ kern/misc.c kern/mm.c kern/reader.c kern/term.c \ @@ -93,13 +95,6 @@ symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist. kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) -# Utilities. -sbin_UTILITIES = grub-mkdevicemap - -# For grub-mkdevicemap. -grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \ - util/devicemap.c util/misc.c - sbin_SCRIPTS += grub-install grub_install_SOURCES = util/grub-install.in @@ -131,12 +126,12 @@ linux_mod_CFLAGS = $(COMMON_CFLAGS) linux_mod_LDFLAGS = $(COMMON_LDFLAGS) # For reboot.mod. -reboot_mod_SOURCES = commands/reboot.c kern/i386/reboot.c +reboot_mod_SOURCES = commands/reboot.c reboot_mod_CFLAGS = $(COMMON_CFLAGS) reboot_mod_LDFLAGS = $(COMMON_LDFLAGS) # For halt.mod. -halt_mod_SOURCES = commands/halt.c kern/i386/halt.c +halt_mod_SOURCES = commands/halt.c halt_mod_CFLAGS = $(COMMON_CFLAGS) halt_mod_LDFLAGS = $(COMMON_LDFLAGS) diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk index 80c2978da..df9ef8082 100644 --- a/conf/i386-efi.rmk +++ b/conf/i386-efi.rmk @@ -9,11 +9,10 @@ script/lexer.c_DEPENDENCIES = grub_script.tab.h # Utilities. bin_UTILITIES = grub-mkimage -sbin_UTILITIES = grub-mkdevicemap # 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. @@ -24,10 +23,6 @@ util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile # fs/ufs.c fs/ufs2.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \ # kern/fs.c kern/env.c fs/fshelp.c -# For grub-mkdevicemap. -grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \ - util/devicemap.c util/misc.c - # Scripts. sbin_SCRIPTS = grub-install @@ -35,14 +30,14 @@ sbin_SCRIPTS = grub-install grub_install_SOURCES = util/i386/efi/grub-install.in # Modules. -pkglib_MODULES = kernel.mod chain.mod appleldr.mod \ +pkglib_MODULES = kernel.img chain.mod appleldr.mod \ linux.mod halt.mod reboot.mod pci.mod lspci.mod \ datetime.mod date.mod datehook.mod loadbios.mod \ fixvideo.mod mmap.mod acpi.mod -# For kernel.mod. -kernel_mod_EXPORTS = no -kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \ +# For kernel.img. +kernel_img_EXPORTS = no +kernel_img_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \ kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \ kern/misc.c kern/mm.c kern/reader.c kern/term.c \ kern/rescue_parser.c kern/rescue_reader.c \ @@ -53,22 +48,22 @@ kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \ kern/i386/tsc.c kern/i386/pit.c \ kern/generic/rtc_get_time_ms.c \ kern/generic/millisleep.c -kernel_mod_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 \ 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 i18n.h -kernel_mod_CFLAGS = $(COMMON_CFLAGS) -kernel_mod_ASFLAGS = $(COMMON_ASFLAGS) -kernel_mod_LDFLAGS = $(COMMON_LDFLAGS) +kernel_img_CFLAGS = $(COMMON_CFLAGS) +kernel_img_ASFLAGS = $(COMMON_ASFLAGS) +kernel_img_LDFLAGS = $(COMMON_LDFLAGS) MOSTLYCLEANFILES += symlist.c MOSTLYCLEANFILES += symlist.c kernel_syms.lst DEFSYMFILES += kernel_syms.lst -symlist.c: $(addprefix include/grub/,$(kernel_mod_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) -kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh +kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) # For boot.mod. @@ -148,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\ diff --git a/conf/i386-ieee1275.rmk b/conf/i386-ieee1275.rmk index 564893666..8d9577844 100644 --- a/conf/i386-ieee1275.rmk +++ b/conf/i386-ieee1275.rmk @@ -47,13 +47,6 @@ symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist. kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) -# Utilities. -sbin_UTILITIES = grub-mkdevicemap - -# For grub-mkdevicemap. -grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \ - util/devicemap.c util/misc.c - # Scripts. sbin_SCRIPTS = grub-install diff --git a/conf/i386-pc.rmk b/conf/i386-pc.rmk index 2b0894eae..7e54b3b67 100644 --- a/conf/i386-pc.rmk +++ b/conf/i386-pc.rmk @@ -81,7 +81,7 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke # Utilities. bin_UTILITIES = grub-mkimage -sbin_UTILITIES = grub-setup grub-mkdevicemap +sbin_UTILITIES = grub-setup # For grub-mkimage. grub_mkimage_SOURCES = gnulib/progname.c util/i386/pc/grub-mkimage.c util/misc.c \ @@ -109,10 +109,6 @@ grub_setup_SOURCES = gnulib/progname.c \ util/raid.c util/lvm.c \ grub_setup_init.c -# For grub-mkdevicemap. -grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \ - util/devicemap.c util/misc.c - sbin_SCRIPTS += grub-install grub_install_SOURCES = util/grub-install.in diff --git a/conf/powerpc-ieee1275.rmk b/conf/powerpc-ieee1275.rmk index 6427f6bbd..85b1fa211 100644 --- a/conf/powerpc-ieee1275.rmk +++ b/conf/powerpc-ieee1275.rmk @@ -28,13 +28,6 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke # Programs pkglib_PROGRAMS = kernel.img -# Utilities. -sbin_UTILITIES = grub-mkdevicemap - -# For grub-mkdevicemap. -grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \ - util/devicemap.c util/misc.c - kernel_img_SOURCES = kern/powerpc/ieee1275/startup.S kern/ieee1275/cmain.c \ kern/ieee1275/ieee1275.c kern/main.c kern/device.c \ kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c \ diff --git a/conf/sparc64-ieee1275.rmk b/conf/sparc64-ieee1275.rmk index 900b70e3c..d19e927a5 100644 --- a/conf/sparc64-ieee1275.rmk +++ b/conf/sparc64-ieee1275.rmk @@ -59,11 +59,11 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke # Utilities. bin_UTILITIES = grub-mkimage -sbin_UTILITIES = grub-setup grub-mkdevicemap grub-ofpathname +sbin_UTILITIES = grub-setup grub-ofpathname # For grub-mkimage. grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \ - util/resolve.c + util/resolve.c gnulib/progname.c # For grub-setup. util/sparc64/ieee1275/grub-setup.c_DEPENDENCIES = grub_setup_init.h @@ -82,16 +82,12 @@ grub_setup_SOURCES = util/sparc64/ieee1275/grub-setup.c util/hostdisk.c \ partmap/sun.c partmap/acorn.c \ \ disk/raid.c disk/mdraid_linux.c disk/lvm.c \ - util/raid.c util/lvm.c \ + util/raid.c util/lvm.c gnulib/progname.c \ grub_setup_init.c -# For grub-mkdevicemap. -grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \ - util/ieee1275/ofpath.c util/ieee1275/devicemap.c util/misc.c - # For grub-ofpathname. grub_ofpathname_SOURCES = util/sparc64/ieee1275/grub-ofpathname.c \ - util/ieee1275/ofpath.c util/misc.c + util/ieee1275/ofpath.c util/misc.c gnulib/progname.c # Scripts. sbin_SCRIPTS = grub-install diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk index 3b7ac34fa..47a2e41e5 100644 --- a/conf/x86_64-efi.rmk +++ b/conf/x86_64-efi.rmk @@ -9,11 +9,10 @@ script/lexer.c_DEPENDENCIES = grub_script.tab.h # Utilities. bin_UTILITIES = grub-mkimage -sbin_UTILITIES = grub-mkdevicemap # 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 \ @@ -23,10 +22,6 @@ grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \ # fs/ufs.c fs/ufs2.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \ # kern/fs.c kern/env.c fs/fshelp.c -# For grub-mkdevicemap. -grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \ - util/devicemap.c util/misc.c - # Scripts. sbin_SCRIPTS = grub-install @@ -34,14 +29,14 @@ sbin_SCRIPTS = grub-install grub_install_SOURCES = util/i386/efi/grub-install.in # Modules. -pkglib_MODULES = kernel.mod chain.mod appleldr.mod \ +pkglib_MODULES = kernel.img chain.mod appleldr.mod \ halt.mod reboot.mod linux.mod pci.mod lspci.mod \ datetime.mod date.mod datehook.mod loadbios.mod \ fixvideo.mod mmap.mod acpi.mod ata.mod -# For kernel.mod. -kernel_mod_EXPORTS = no -kernel_mod_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.S \ +# For kernel.img. +kernel_img_EXPORTS = no +kernel_img_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.S \ kern/main.c kern/device.c \ kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \ kern/misc.c kern/mm.c kern/reader.c kern/term.c \ @@ -52,23 +47,23 @@ kernel_mod_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.S \ kern/i386/tsc.c kern/i386/pit.c \ kern/generic/millisleep.c kern/generic/rtc_get_time_ms.c \ term/efi/console.c disk/efi/efidisk.c -kernel_mod_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 \ 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 \ handler.h command.h i18n.h -kernel_mod_CFLAGS = $(COMMON_CFLAGS) -kernel_mod_ASFLAGS = $(COMMON_ASFLAGS) -kernel_mod_LDFLAGS = $(COMMON_LDFLAGS) +kernel_img_CFLAGS = $(COMMON_CFLAGS) +kernel_img_ASFLAGS = $(COMMON_ASFLAGS) +kernel_img_LDFLAGS = $(COMMON_LDFLAGS) MOSTLYCLEANFILES += symlist.c MOSTLYCLEANFILES += symlist.c kernel_syms.lst DEFSYMFILES += kernel_syms.lst -symlist.c: $(addprefix include/grub/,$(kernel_mod_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) -kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh +kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) # For boot.mod. @@ -154,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\ diff --git a/configure.ac b/configure.ac index 0a76c7b51..6560d3e31 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ dnl type. AC_INIT([GRUB],[1.97],[bug-grub@gnu.org]) AM_INIT_AUTOMAKE() -AC_PREREQ(2.59d) +AC_PREREQ(2.60) AC_CONFIG_SRCDIR([include/grub/dl.h]) AC_CONFIG_HEADER([config.h]) @@ -122,6 +122,7 @@ case "$platform" in emu) machine_CFLAGS="-DGRUB_MACHINE_EMU=1" ;; esac CFLAGS="$CFLAGS $machine_CFLAGS" +TARGET_ASFLAGS="$TARGET_ASFLAGS $machine_CFLAGS" TARGET_CFLAGS="$TARGET_CFLAGS $machine_CFLAGS" AC_SUBST(host_cpu) @@ -193,7 +194,7 @@ else fi # Check for functions. -AC_CHECK_FUNCS(posix_memalign memalign asprintf) +AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf) # For grub-mkisofs AC_HEADER_MAJOR @@ -525,6 +526,10 @@ AC_ARG_ENABLE([grub-emu-usb], [AS_HELP_STRING([--enable-grub-emu-usb], [build and install the `grub-emu' debugging utility with USB support (default=guessed)])]) +AC_ARG_ENABLE([grub-emu-pci], + [AS_HELP_STRING([--enable-grub-emu-pci], + [build and install the `grub-emu' debugging utility with PCI support (potentially dangerous) (default=no)])]) + if test "$platform" = emu; then missing_ncurses= [# Check for curses libraries.] @@ -546,6 +551,11 @@ fi if test x"$enable_grub_emu_usb" = xno ; then grub_emu_usb_excuse="explicitly disabled" fi + +if test x"$enable_grub_emu_pci" = xyes ; then + grub_emu_usb_excuse="conflicts with PCI support" +fi + [if [ x"$grub_emu_usb_excuse" = x ]; then # Check for libusb libraries.] AC_CHECK_LIB([usb], [usb_claim_interface], [LIBUSB="-lusb"], @@ -565,7 +575,35 @@ enable_grub_emu_usb=yes else enable_grub_emu_usb=no fi + +if test x"$enable_grub_emu_pci" != xyes ; then + grub_emu_pci_excuse="not enabled" +fi + +if test x"$enable_grub_emu_usb" = xyes ; then + grub_emu_pci_excuse="conflicts with USB support" +fi + +[if [ x"$grub_emu_pci_excuse" = x ]; then + # Check for libpci libraries.] + AC_CHECK_LIB([pciaccess], [pci_system_init], [LIBPCIACCESS="-lpciaccess"], + [grub_emu_pci_excuse=["need libpciaccess library"]]) + AC_SUBST([LIBPCIACCESS]) +[fi] +[if [ x"$grub_emu_pci_excuse" = x ]; then + # Check for headers.] + AC_CHECK_HEADERS([pci/pci.h], [], + [grub_emu_pci_excuse=["need libpciaccess headers"]]) +[fi] + +if test x"$grub_emu_pci_excuse" = x ; then +enable_grub_emu_pci=yes +else +enable_grub_emu_pci=no +fi + AC_SUBST([enable_grub_emu_usb]) +AC_SUBST([enable_grub_emu_pci]) fi AC_ARG_ENABLE([grub-fstest], @@ -640,6 +678,11 @@ echo USB support for grub-emu: Yes else echo USB support for grub-emu: No "($grub_emu_usb_excuse)" fi +if [ x"$grub_emu_pci_excuse" = x ]; then +echo PCI support for grub-emu: Yes +else +echo PCI support for grub-emu: No "($grub_emu_pci_excuse)" +fi fi if [ x"$enable_mm_debug" = xyes ]; then echo With memory debugging: Yes diff --git a/disk/ata.c b/disk/ata.c index 11489828f..af8c87180 100644 --- a/disk/ata.c +++ b/disk/ata.c @@ -388,7 +388,7 @@ grub_ata_device_initialize (int port, int device, int addr, int addr2) } static int NESTED_FUNC_ATTR -grub_ata_pciinit (int bus, int device, int func, +grub_ata_pciinit (grub_pci_device_t dev, grub_pci_id_t pciid __attribute__((unused))) { static int compat_use[2] = { 0 }; @@ -402,7 +402,7 @@ grub_ata_pciinit (int bus, int device, int func, static int controller = 0; /* Read class. */ - addr = grub_pci_make_address (bus, device, func, 2); + addr = grub_pci_make_address (dev, 2); class = grub_pci_read (addr); /* Check if this class ID matches that of a PCI IDE Controller. */ @@ -429,9 +429,9 @@ grub_ata_pciinit (int bus, int device, int func, { /* Read the BARs, which either contain a mmapped IO address or the IO port address. */ - addr = grub_pci_make_address (bus, device, func, 4 + 2 * i); + addr = grub_pci_make_address (dev, 4 + 2 * i); bar1 = grub_pci_read (addr); - addr = grub_pci_make_address (bus, device, func, 5 + 2 * i); + addr = grub_pci_make_address (dev, 5 + 2 * i); bar2 = grub_pci_read (addr); /* Check if the BARs describe an IO region. */ @@ -444,7 +444,8 @@ grub_ata_pciinit (int bus, int device, int func, grub_dprintf ("ata", "PCI dev (%d,%d,%d) compat=%d rega=0x%x regb=0x%x\n", - bus, device, func, compat, rega, regb); + grub_pci_get_bus (dev), grub_pci_get_device (dev), + grub_pci_get_function (dev), compat, rega, regb); if (rega && regb) { diff --git a/disk/i386/pc/biosdisk.c b/disk/i386/pc/biosdisk.c index 0a6137fad..af184b1ba 100644 --- a/disk/i386/pc/biosdisk.c +++ b/disk/i386/pc/biosdisk.c @@ -169,7 +169,7 @@ grub_biosdisk_open (const char *name, grub_disk_t disk) else { grub_free (data); - return grub_error (GRUB_ERR_BAD_DEVICE, "cannot get C/H/S values"); + return grub_error (GRUB_ERR_BAD_DEVICE, "%s cannot get C/H/S values", disk->name); } } @@ -252,7 +252,7 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk, 1024 /* cylinders */ * 256 /* heads */ * 63 /* spt */) - return grub_error (GRUB_ERR_OUT_OF_RANGE, "out of disk"); + return grub_error (GRUB_ERR_OUT_OF_RANGE, "%s out of disk", disk->name); soff = ((grub_uint32_t) sector) % data->sectors + 1; head = ((grub_uint32_t) sector) / data->sectors; @@ -260,7 +260,7 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk, coff = head / data->heads; if (coff >= data->cylinders) - return grub_error (GRUB_ERR_OUT_OF_RANGE, "out of disk"); + return grub_error (GRUB_ERR_OUT_OF_RANGE, "%s out of disk", disk->name); if (grub_biosdisk_rw_standard (cmd + 0x02, data->drive, coff, hoff, soff, size, segment)) @@ -268,9 +268,9 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk, switch (cmd) { case GRUB_BIOSDISK_READ: - return grub_error (GRUB_ERR_READ_ERROR, "biosdisk read error"); + return grub_error (GRUB_ERR_READ_ERROR, "%s read error", disk->name); case GRUB_BIOSDISK_WRITE: - return grub_error (GRUB_ERR_WRITE_ERROR, "biosdisk write error"); + return grub_error (GRUB_ERR_WRITE_ERROR, "%s write error", disk->name); } } } diff --git a/disk/ieee1275/ofdisk.c b/disk/ieee1275/ofdisk.c index ca257d6d1..a33d729e3 100644 --- a/disk/ieee1275/ofdisk.c +++ b/disk/ieee1275/ofdisk.c @@ -107,7 +107,7 @@ grub_ofdisk_iterate (int (*hook) (const char *name)) } if (! grub_strcmp (alias->type, "block") && - grub_strcmp (alias->name, "cdrom")) + grub_strncmp (alias->name, "cdrom", 5)) ret = hook (alias->name); return ret; } diff --git a/fs/ntfs.c b/fs/ntfs.c index 163f3e0a8..c780887c6 100644 --- a/fs/ntfs.c +++ b/fs/ntfs.c @@ -63,7 +63,7 @@ fixup (struct grub_ntfs_data *data, char *buf, int len, char *magic) static grub_err_t read_mft (struct grub_ntfs_data *data, char *buf, grub_uint32_t mftno); static grub_err_t read_attr (struct grub_ntfs_attr *at, char *dest, - grub_uint32_t ofs, grub_uint32_t len, + grub_disk_addr_t ofs, grub_size_t len, int cached, void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t @@ -72,7 +72,7 @@ static grub_err_t read_attr (struct grub_ntfs_attr *at, char *dest, unsigned length)); static grub_err_t read_data (struct grub_ntfs_attr *at, char *pa, char *dest, - grub_uint32_t ofs, grub_uint32_t len, + grub_disk_addr_t ofs, grub_size_t len, int cached, void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t @@ -260,9 +260,9 @@ locate_attr (struct grub_ntfs_attr *at, struct grub_ntfs_file *mft, } static char * -read_run_data (char *run, int nn, grub_uint32_t * val, int sig) +read_run_data (char *run, int nn, grub_disk_addr_t * val, int sig) { - grub_uint32_t r, v; + grub_disk_addr_t r, v; r = 0; v = 1; @@ -284,7 +284,7 @@ grub_err_t grub_ntfs_read_run_list (struct grub_ntfs_rlst * ctx) { int c1, c2; - grub_uint32_t val; + grub_disk_addr_t val; char *run; run = ctx->cur_run; @@ -335,25 +335,25 @@ grub_ntfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t block) struct grub_ntfs_rlst *ctx; ctx = (struct grub_ntfs_rlst *) node; - if ((grub_uint32_t) block >= ctx->next_vcn) + if (block >= ctx->next_vcn) { if (grub_ntfs_read_run_list (ctx)) return -1; return ctx->curr_lcn; } else - return (ctx->flags & RF_BLNK) ? 0 : ((grub_uint32_t) block - + return (ctx->flags & RF_BLNK) ? 0 : (block - ctx->curr_vcn + ctx->curr_lcn); } static grub_err_t -read_data (struct grub_ntfs_attr *at, char *pa, char *dest, grub_uint32_t ofs, - grub_uint32_t len, int cached, +read_data (struct grub_ntfs_attr *at, char *pa, char *dest, + grub_disk_addr_t ofs, grub_size_t len, int cached, void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length)) { - grub_uint32_t vcn; + grub_disk_addr_t vcn; struct grub_ntfs_rlst cc, *ctx; if (len == 0) @@ -388,7 +388,7 @@ read_data (struct grub_ntfs_attr *at, char *pa, char *dest, grub_uint32_t ofs, { if ((ofs & (~(COM_LEN - 1))) == at->save_pos) { - grub_uint32_t n; + grub_disk_addr_t n; n = COM_LEN - (ofs - at->save_pos); if (n > len) @@ -411,11 +411,11 @@ read_data (struct grub_ntfs_attr *at, char *pa, char *dest, grub_uint32_t ofs, at->save_pos = 1; } - vcn = ctx->target_vcn = (ofs / COM_LEN) * (COM_SEC / ctx->comp.spc); + vcn = ctx->target_vcn = (ofs >> COM_LOG_LEN) * (COM_SEC / ctx->comp.spc); ctx->target_vcn &= ~0xF; } else - vcn = ctx->target_vcn = (ofs >> BLK_SHR) / ctx->comp.spc; + vcn = ctx->target_vcn = grub_divmod64 (ofs >> BLK_SHR, ctx->comp.spc, 0); ctx->next_vcn = u32at (pa, 0x10); ctx->curr_lcn = 0; @@ -427,11 +427,13 @@ read_data (struct grub_ntfs_attr *at, char *pa, char *dest, grub_uint32_t ofs, if (at->flags & AF_GPOS) { - grub_uint32_t st0, st1; + grub_disk_addr_t st0, st1; + grub_uint32_t m; + + grub_divmod64 (ofs >> BLK_SHR, ctx->comp.spc, &m); st0 = - (ctx->target_vcn - ctx->curr_vcn + ctx->curr_lcn) * ctx->comp.spc + - ((ofs >> BLK_SHR) % ctx->comp.spc); + (ctx->target_vcn - ctx->curr_vcn + ctx->curr_lcn) * ctx->comp.spc + m; st1 = st0 + 1; if (st1 == (ctx->next_vcn - ctx->curr_vcn + ctx->curr_lcn) * ctx->comp.spc) @@ -462,8 +464,8 @@ read_data (struct grub_ntfs_attr *at, char *pa, char *dest, grub_uint32_t ofs, } static grub_err_t -read_attr (struct grub_ntfs_attr *at, char *dest, grub_uint32_t ofs, - grub_uint32_t len, int cached, +read_attr (struct grub_ntfs_attr *at, char *dest, grub_disk_addr_t ofs, + grub_size_t len, int cached, void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length)) @@ -479,9 +481,9 @@ read_attr (struct grub_ntfs_attr *at, char *dest, grub_uint32_t ofs, if (at->flags & AF_ALST) { char *pa; - grub_uint32_t vcn; + grub_disk_addr_t vcn; - vcn = ofs / (at->mft->data->spc << BLK_SHR); + vcn = grub_divmod64 (ofs, at->mft->data->spc << BLK_SHR, 0); pa = at->attr_nxt + u16at (at->attr_nxt, 4); while (pa < at->attr_end) { @@ -508,7 +510,7 @@ static grub_err_t read_mft (struct grub_ntfs_data *data, char *buf, grub_uint32_t mftno) { if (read_attr - (&data->mmft.attr, buf, mftno * (data->mft_size << BLK_SHR), + (&data->mmft.attr, buf, mftno * ((grub_disk_addr_t) data->mft_size << BLK_SHR), data->mft_size << BLK_SHR, 0, 0)) return grub_error (GRUB_ERR_BAD_FS, "Read MFT 0x%X fails", mftno); return fixup (data, buf, data->mft_size, "FILE"); @@ -640,7 +642,8 @@ grub_ntfs_iterate_dir (grub_fshelp_node_t dir, unsigned char *bitmap; struct grub_ntfs_attr attr, *at; char *cur_pos, *indx, *bmp; - int bitmap_len, ret = 0; + int ret = 0; + grub_size_t bitmap_len; struct grub_ntfs_file *mft; mft = (struct grub_ntfs_file *) dir; @@ -744,14 +747,14 @@ grub_ntfs_iterate_dir (grub_fshelp_node_t dir, if (bitmap) { - grub_uint32_t v, i; + grub_disk_addr_t v, i; indx = grub_malloc (mft->data->idx_size << BLK_SHR); if (indx == NULL) goto done; v = 1; - for (i = 0; i < (grub_uint32_t) bitmap_len * 8; i++) + for (i = 0; i < (grub_disk_addr_t)bitmap_len * 8; i++) { if (*bitmap & v) { diff --git a/fs/ntfscomp.c b/fs/ntfscomp.c index 20c79ac07..6bb33ffb1 100644 --- a/fs/ntfscomp.c +++ b/fs/ntfscomp.c @@ -209,7 +209,7 @@ read_block (struct grub_ntfs_rlst *ctx, char *buf, int num) } } - nn = (16 - (ctx->target_vcn & 0xF)) / cpb; + nn = (16 - (unsigned) (ctx->target_vcn & 0xF)) / cpb; if (nn > num) nn = num; num -= nn; diff --git a/gettext/gettext.c b/gettext/gettext.c index 856265e6f..65db73a78 100644 --- a/gettext/gettext.c +++ b/gettext/gettext.c @@ -17,6 +17,7 @@ * along with GRUB. If not, see . */ +#include #include #include #include @@ -41,6 +42,16 @@ static int grub_gettext_max; static const char *(*grub_gettext_original) (const char *s); +struct grub_gettext_msg +{ + struct grub_gettext_msg *next; + const char *name; + + const char *translated; +}; + +struct grub_gettext_msg *grub_gettext_msg_list = NULL; + #define GETTEXT_MAGIC_NUMBER 0 #define GETTEXT_FILE_FORMAT 4 #define GETTEXT_NUMBER_OF_STRINGS 8 @@ -79,7 +90,7 @@ grub_gettext_getstring_from_offset (grub_uint32_t offset, translation[length] = '\0'; } -static char * +static const char * grub_gettext_gettranslation_from_position (int position) { int offsettranslation; @@ -130,9 +141,18 @@ static const char * grub_gettext_translate (const char *orig) { char *current_string; - char *ret; + const char *ret; int min, max, current; + int found = 0; + + struct grub_gettext_msg *cur; + + cur = grub_named_list_find (GRUB_AS_NAMED_LIST (grub_gettext_msg_list), + orig); + + if (cur) + return cur->translated; if (fd_mo == 0) return orig; @@ -142,7 +162,7 @@ grub_gettext_translate (const char *orig) current = (max + min) / 2; - while (current != min && current != max) + while (current != min && current != max && found == 0) { current_string = grub_gettext_getstring_from_position (current); @@ -160,13 +180,31 @@ grub_gettext_translate (const char *orig) else if (grub_strcmp (current_string, orig) == 0) { grub_free (current_string); - return grub_gettext_gettranslation_from_position (current); + found = 1; } current = (max + min) / 2; } - ret = grub_malloc (grub_strlen (orig) + 1); - grub_strcpy (ret, orig); + ret = found ? grub_gettext_gettranslation_from_position (current) : orig; + + if (found) + { + cur = grub_zalloc (sizeof (*cur)); + + if (cur) + { + cur->name = grub_strdup (orig); + if (cur->name) + { + cur->translated = ret; + grub_list_push (GRUB_AS_LIST_P (&grub_gettext_msg_list), + GRUB_AS_LIST (cur)); + } + } + else + grub_errno = GRUB_ERR_NONE; + } + return ret; } @@ -222,7 +260,7 @@ grub_gettext_init_ext (const char *lang) locale_dir = grub_env_get ("locale_dir"); if (locale_dir == NULL) { - grub_printf ("locale_dir variable is not set up."); + grub_dprintf ("gettext", "locale_dir variable is not set up.\n"); return; } @@ -259,12 +297,29 @@ grub_gettext_init_ext (const char *lang) } } +static void +grub_gettext_delete_list () +{ + struct grub_gettext_msg *item; + + while ((item = + grub_list_pop (GRUB_AS_LIST_P (&grub_gettext_msg_list))) != 0) + { + char *original = (char *) ((struct grub_gettext_msg *) item)->name; + grub_free (original); + + // Don't delete the translated message because could be in use. + } +} + static char * grub_gettext_env_write_lang (struct grub_env_var *var __attribute__ ((unused)), const char *val) { grub_gettext_init_ext (val); + grub_gettext_delete_list (); + return grub_strdup (val); } @@ -307,5 +362,7 @@ GRUB_MOD_FINI (gettext) if (fd_mo != 0) grub_file_close (fd_mo); + grub_gettext_delete_list (); + grub_gettext = grub_gettext_original; } diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h index 916f9d662..43f152981 100644 --- a/include/grub/efi/efi.h +++ b/include/grub/efi/efi.h @@ -54,8 +54,6 @@ char *EXPORT_FUNC(grub_efi_get_filename) (grub_efi_device_path_t *dp); grub_efi_device_path_t * EXPORT_FUNC(grub_efi_get_device_path) (grub_efi_handle_t handle); int EXPORT_FUNC(grub_efi_exit_boot_services) (grub_efi_uintn_t map_key); -void EXPORT_FUNC (grub_reboot) (void); -void EXPORT_FUNC (grub_halt) (void); int EXPORT_FUNC (grub_efi_finish_boot_services) (void); void grub_efi_mm_init (void); diff --git a/include/grub/efi/graphics_output.h b/include/grub/efi/graphics_output.h new file mode 100644 index 000000000..a55869dc7 --- /dev/null +++ b/include/grub/efi/graphics_output.h @@ -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 . + */ + +#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 diff --git a/include/grub/i386/halt.h b/include/grub/i386/halt.h deleted file mode 100644 index 1c403a7d5..000000000 --- a/include/grub/i386/halt.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * GRUB -- GRand Unified Bootloader - * Copyright (C) 2008 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 . - */ - -extern void grub_halt (void); diff --git a/include/grub/i386/pc/init.h b/include/grub/i386/pc/init.h index 0029959ae..2be80e773 100644 --- a/include/grub/i386/pc/init.h +++ b/include/grub/i386/pc/init.h @@ -39,13 +39,6 @@ grub_uint32_t EXPORT_FUNC(grub_get_mmap_entry) (struct grub_machine_mmap_entry * /* Turn on/off Gate A20. */ void grub_gate_a20 (int on); -/* Reboot the machine. */ -void EXPORT_FUNC (grub_reboot) (void); - -/* Halt the system, using APM if possible. If NO_APM is true, don't - * use APM even if it is available. */ -void EXPORT_FUNC (grub_halt) (int no_apm); - void EXPORT_FUNC(grub_stop_floppy) (void); #endif /* ! GRUB_INIT_MACHINE_HEADER */ diff --git a/include/grub/i386/pci.h b/include/grub/i386/pci.h index 996f64245..5b5f5f0df 100644 --- a/include/grub/i386/pci.h +++ b/include/grub/i386/pci.h @@ -67,4 +67,20 @@ grub_pci_write_byte (grub_pci_address_t addr, grub_uint8_t data) grub_outb (data, GRUB_PCI_DATA_REG + (addr & 3)); } +static inline void * +grub_pci_device_map_range (grub_pci_device_t dev __attribute__ ((unused)), + grub_addr_t base, + grub_size_t size __attribute__ ((unused))) +{ + return (void *) base; +} + +static inline void +grub_pci_device_unmap_range (grub_pci_device_t dev __attribute__ ((unused)), + void *mem __attribute__ ((unused)), + grub_size_t size __attribute__ ((unused))) +{ +} + + #endif /* GRUB_CPU_PCI_H */ diff --git a/include/grub/i386/reboot.h b/include/grub/i386/reboot.h deleted file mode 100644 index 5bcbb5d64..000000000 --- a/include/grub/i386/reboot.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * GRUB -- GRand Unified Bootloader - * Copyright (C) 2008 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 . - */ - -extern void grub_reboot (void); diff --git a/include/grub/misc.h b/include/grub/misc.h index 31d4ddf85..1ab63ac0b 100644 --- a/include/grub/misc.h +++ b/include/grub/misc.h @@ -171,6 +171,7 @@ char *EXPORT_FUNC(grub_strndup) (const char *s, grub_size_t n); void *EXPORT_FUNC(grub_memset) (void *s, int c, grub_size_t n); grub_size_t EXPORT_FUNC(grub_strlen) (const char *s); int EXPORT_FUNC(grub_printf) (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +int EXPORT_FUNC(grub_printf_) (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); void EXPORT_FUNC(grub_real_dprintf) (const char *file, const int line, const char *condition, @@ -222,4 +223,15 @@ grub_div_roundup (unsigned int x, unsigned int y) return (x + y - 1) / y; } +/* Reboot the machine. */ +void EXPORT_FUNC (grub_reboot) (void); + +#ifdef GRUB_MACHINE_PCBIOS +/* Halt the system, using APM if possible. If NO_APM is true, don't + * use APM even if it is available. */ +void EXPORT_FUNC (grub_halt) (int no_apm); +#else +void EXPORT_FUNC (grub_halt) (void); +#endif + #endif /* ! GRUB_MISC_HEADER */ diff --git a/include/grub/ntfs.h b/include/grub/ntfs.h index 6482e964b..6f9d4ad6e 100644 --- a/include/grub/ntfs.h +++ b/include/grub/ntfs.h @@ -73,6 +73,7 @@ #define MAX_IDX (16384 >> BLK_SHR) #define COM_LEN 4096 +#define COM_LOG_LEN 12 #define COM_SEC (COM_LEN >> BLK_SHR) #define AF_ALST 1 @@ -164,7 +165,7 @@ struct grub_ntfs_comp struct grub_ntfs_rlst { int flags; - grub_uint32_t target_vcn, curr_vcn, next_vcn, curr_lcn; + grub_disk_addr_t target_vcn, curr_vcn, next_vcn, curr_lcn; char *cur_run; struct grub_ntfs_attr *attr; struct grub_ntfs_comp comp; diff --git a/include/grub/pci.h b/include/grub/pci.h index 7c8b50528..2bea05410 100644 --- a/include/grub/pci.h +++ b/include/grub/pci.h @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2008 Free Software Foundation, Inc. + * Copyright (C) 2008,2009 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,15 +36,44 @@ #define GRUB_PCI_ADDR_IO_MASK ~0x03 typedef grub_uint32_t grub_pci_id_t; -typedef int NESTED_FUNC_ATTR (*grub_pci_iteratefunc_t) - (int bus, int device, int func, grub_pci_id_t pciid); -typedef grub_uint32_t grub_pci_address_t; -grub_pci_address_t EXPORT_FUNC(grub_pci_make_address) (int bus, int device, - int function, int reg); +#ifdef GRUB_UTIL +#include +#else +typedef grub_uint32_t grub_pci_address_t; +struct grub_pci_device +{ + int bus; + int device; + int function; +}; +typedef struct grub_pci_device grub_pci_device_t; +static inline int +grub_pci_get_bus (grub_pci_device_t dev) +{ + return dev.bus; +} + +static inline int +grub_pci_get_device (grub_pci_device_t dev) +{ + return dev.device; +} + +static inline int +grub_pci_get_function (grub_pci_device_t dev) +{ + return dev.function; +} +#include +#endif + +typedef int NESTED_FUNC_ATTR (*grub_pci_iteratefunc_t) + (grub_pci_device_t dev, grub_pci_id_t pciid); + +grub_pci_address_t EXPORT_FUNC(grub_pci_make_address) (grub_pci_device_t dev, + int reg); void EXPORT_FUNC(grub_pci_iterate) (grub_pci_iteratefunc_t hook); -#include - #endif /* GRUB_PCI_H */ diff --git a/include/grub/pciutils.h b/include/grub/pciutils.h new file mode 100644 index 000000000..36d47e5c8 --- /dev/null +++ b/include/grub/pciutils.h @@ -0,0 +1,103 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2008,2009 Free Software Foundation, Inc. + * + * GRUB is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * 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 . + */ + +#ifndef GRUB_PCIUTILS_H +#define GRUB_PCIUTILS_H 1 + +#include + +typedef struct pci_device *grub_pci_device_t; + +static inline int +grub_pci_get_bus (grub_pci_device_t dev) +{ + return dev->bus; +} + +static inline int +grub_pci_get_device (grub_pci_device_t dev) +{ + return dev->dev; +} + +static inline int +grub_pci_get_function (grub_pci_device_t dev) +{ + return dev->func; +} + +struct grub_pci_address +{ + grub_pci_device_t dev; + int pos; +}; + +typedef struct grub_pci_address grub_pci_address_t; + +static inline grub_uint32_t +grub_pci_read (grub_pci_address_t addr) +{ + grub_uint32_t ret; + pci_device_cfg_read_u32 (addr.dev, &ret, addr.pos); + return ret; +} + +static inline grub_uint16_t +grub_pci_read_word (grub_pci_address_t addr) +{ + grub_uint16_t ret; + pci_device_cfg_read_u16 (addr.dev, &ret, addr.pos); + return ret; +} + +static inline grub_uint8_t +grub_pci_read_byte (grub_pci_address_t addr) +{ + grub_uint8_t ret; + pci_device_cfg_read_u8 (addr.dev, &ret, addr.pos); + return ret; +} + +static inline void +grub_pci_write (grub_pci_address_t addr, grub_uint32_t data) +{ + pci_device_cfg_write_u32 (addr.dev, data, addr.pos); +} + +static inline void +grub_pci_write_word (grub_pci_address_t addr, grub_uint16_t data) +{ + pci_device_cfg_write_u16 (addr.dev, data, addr.pos); +} + +static inline void +grub_pci_write_byte (grub_pci_address_t addr, grub_uint8_t data) +{ + pci_device_cfg_write_u8 (addr.dev, data, addr.pos); +} + +void * +grub_pci_device_map_range (grub_pci_device_t dev, grub_addr_t base, + grub_size_t size); + +void +grub_pci_device_unmap_range (grub_pci_device_t dev, void *mem, + grub_size_t size); + + +#endif /* GRUB_PCIUTILS_H */ diff --git a/include/grub/powerpc/ieee1275/kernel.h b/include/grub/powerpc/ieee1275/kernel.h index 917e1548f..a76c2a4df 100644 --- a/include/grub/powerpc/ieee1275/kernel.h +++ b/include/grub/powerpc/ieee1275/kernel.h @@ -23,9 +23,6 @@ #ifndef ASM_FILE -void EXPORT_FUNC (grub_reboot) (void); -void EXPORT_FUNC (grub_halt) (void); - /* The prefix which points to the directory where GRUB modules and its configuration file are located. */ extern char grub_prefix[]; diff --git a/include/grub/sparc64/ieee1275/kernel.h b/include/grub/sparc64/ieee1275/kernel.h index 03a631492..e63e1f616 100644 --- a/include/grub/sparc64/ieee1275/kernel.h +++ b/include/grub/sparc64/ieee1275/kernel.h @@ -54,9 +54,6 @@ extern grub_int32_t grub_total_module_size; configuration file are located. */ extern char grub_prefix[]; -void EXPORT_FUNC (grub_reboot) (void); -void EXPORT_FUNC (grub_halt) (void); - #endif /* ! ASM_FILE */ #endif /* ! GRUB_KERNEL_MACHINE_HEADER */ diff --git a/include/grub/util/misc.h b/include/grub/util/misc.h index d0184d416..09108547c 100644 --- a/include/grub/util/misc.h +++ b/include/grub/util/misc.h @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -57,12 +58,20 @@ void grub_util_write_image (const char *img, size_t size, FILE *out); void grub_util_write_image_at (const void *img, size_t size, off_t offset, FILE *out); +#ifndef HAVE_VASPRINTF + +int vasprintf (char **buf, const char *fmt, va_list ap); + +#endif + #ifndef HAVE_ASPRINTF int asprintf (char **buf, const char *fmt, ...); #endif +char *xasprintf (const char *fmt, ...); + #ifdef __MINGW32__ #define fseeko fseeko64 diff --git a/kern/device.c b/kern/device.c index 83ae3dcc8..9f219949b 100644 --- a/kern/device.c +++ b/kern/device.c @@ -109,6 +109,8 @@ grub_device_iterate (int (*hook) (const char *name)) (void) grub_partition_iterate (dev->disk, iterate_partition); grub_device_close (dev); + grub_errno = GRUB_ERR_NONE; + p = ents; while (p != NULL) { diff --git a/kern/i386/halt.c b/kern/i386/halt.c index 2f0043539..10805e42b 100644 --- a/kern/i386/halt.c +++ b/kern/i386/halt.c @@ -17,7 +17,6 @@ */ #include -#include #include #include diff --git a/kern/i386/pc/startup.S b/kern/i386/pc/startup.S index da3624c89..87365c0ed 100644 --- a/kern/i386/pc/startup.S +++ b/kern/i386/pc/startup.S @@ -484,21 +484,6 @@ FUNCTION(grub_exit) jmp cold_reboot .code32 -/* - * grub_reboot() - * - * Reboot the system. At the moment, rely on BIOS. - */ -FUNCTION(grub_reboot) - call prot_to_real - .code16 -cold_reboot: - /* cold boot */ - movw $0x0472, %di - movw %ax, (%di) - ljmp $0xFFFF, $0x0000 - .code32 - /* * grub_halt(int no_apm) * diff --git a/kern/i386/qemu/startup.S b/kern/i386/qemu/startup.S index 0be5ae84f..7d3cb1b5e 100644 --- a/kern/i386/qemu/startup.S +++ b/kern/i386/qemu/startup.S @@ -95,3 +95,5 @@ codestart: /* This should never happen. */ jmp EXT_C(grub_stop) + +#include "../realmode.S" diff --git a/kern/i386/realmode.S b/kern/i386/realmode.S index 11f4d5347..424dd0eca 100644 --- a/kern/i386/realmode.S +++ b/kern/i386/realmode.S @@ -215,10 +215,27 @@ realcseg: movw %ax, %gs movw %ax, %ss +#ifdef GRUB_MACHINE_PCBIOS /* restore interrupts */ sti +#endif /* return on new stack! */ DATA32 ret .code32 + +/* + * grub_reboot() + * + * Reboot the system. At the moment, rely on BIOS. + */ +FUNCTION(grub_reboot) + call prot_to_real + .code16 +cold_reboot: + /* set 0x472 to 0x0000 for cold boot (0x1234 for warm boot) */ + movw $0x0472, %di + movw %ax, (%di) + ljmp $0xf000, $0xfff0 + .code32 diff --git a/kern/i386/reboot.c b/kern/i386/reboot.c deleted file mode 100644 index 6d562f827..000000000 --- a/kern/i386/reboot.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * GRUB -- GRand Unified Bootloader - * Copyright (C) 2008 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 . - */ - -#include -#include -#include -#include - -void -grub_reboot (void) -{ - /* Use the keyboard controller to reboot. That's what keyboards were - designed for, isn't it? */ - grub_outb (KEYBOARD_COMMAND_REBOOT, KEYBOARD_REG_STATUS); - - grub_printf ("GRUB doesn't know how to reboot this machine yet!\n"); -} diff --git a/kern/ieee1275/openfw.c b/kern/ieee1275/openfw.c index 20ef730e0..9a2b0c9aa 100644 --- a/kern/ieee1275/openfw.c +++ b/kern/ieee1275/openfw.c @@ -1,7 +1,7 @@ /* openfw.c -- Open firmware support functions. */ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2003,2004,2005,2007,2008 Free Software Foundation, Inc. + * Copyright (C) 2003,2004,2005,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 @@ -399,11 +399,14 @@ grub_ieee1275_encode_devname (const char *path) return encoding; } +/* On i386, a firmware-independant grub_reboot() is provided by realmode.S. */ +#ifndef __i386__ void grub_reboot (void) { grub_ieee1275_interpret ("reset-all", 0); } +#endif void grub_halt (void) diff --git a/kern/misc.c b/kern/misc.c index 9f9a3ae65..4415b8204 100644 --- a/kern/misc.c +++ b/kern/misc.c @@ -126,6 +126,19 @@ grub_printf (const char *fmt, ...) return ret; } +int +grub_printf_ (const char *fmt, ...) +{ + va_list ap; + int ret; + + va_start (ap, fmt); + ret = grub_vprintf (_(fmt), ap); + va_end (ap); + + return ret; +} + #if defined (APPLE_CC) && ! defined (GRUB_UTIL) int grub_err_printf (const char *fmt, ...) diff --git a/lib/arg.c b/lib/arg.c index ed37986b6..24e9d5b15 100644 --- a/lib/arg.c +++ b/lib/arg.c @@ -355,7 +355,7 @@ grub_arg_parse (grub_extcmd_t cmd, int argc, char **argv, { char *tail; - grub_strtoul (option, &tail, 0); + grub_strtoull (option, &tail, 0); if (tail == 0 || tail == option || *tail != '\0' || grub_errno) { grub_error (GRUB_ERR_BAD_ARGUMENT, diff --git a/loader/i386/efi/linux.c b/loader/i386/efi/linux.c index f96c60e11..8cd4d23f2 100644 --- a/loader/i386/efi/linux.c +++ b/loader/i386/efi/linux.c @@ -469,21 +469,22 @@ find_framebuf (grub_uint32_t *fb_base, grub_uint32_t *line_len) { int found = 0; - auto int NESTED_FUNC_ATTR find_card (int bus, int dev, int func, + auto int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid); - int NESTED_FUNC_ATTR find_card (int bus, int dev, int func, + int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid) { grub_pci_address_t addr; - addr = grub_pci_make_address (bus, dev, func, 2); + addr = grub_pci_make_address (dev, 2); if (grub_pci_read (addr) >> 24 == 0x3) { int i; grub_printf ("Display controller: %d:%d.%d\nDevice id: %x\n", - bus, dev, func, pciid); + grub_pci_get_bus (dev), grub_pci_get_device (dev), + grub_pci_get_function (dev), pciid); addr += 8; for (i = 0; i < 6; i++, addr += 4) { diff --git a/loader/i386/efi/xnu.c b/loader/i386/efi/xnu.c index 5085cdbea..236732804 100644 --- a/loader/i386/efi/xnu.c +++ b/loader/i386/efi/xnu.c @@ -71,21 +71,22 @@ find_framebuf (grub_uint32_t *fb_base, grub_uint32_t *line_len) { int found = 0; - auto int NESTED_FUNC_ATTR find_card (int bus, int dev, int func, + auto int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid); - int NESTED_FUNC_ATTR find_card (int bus, int dev, int func, + int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid) { grub_pci_address_t addr; - addr = grub_pci_make_address (bus, dev, func, 2); + addr = grub_pci_make_address (dev, 2); if (grub_pci_read (addr) >> 24 == 0x3) { int i; grub_printf ("Display controller: %d:%d.%d\nDevice id: %x\n", - bus, dev, func, pciid); + grub_pci_get_bus (dev), grub_pci_get_device (dev), + grub_pci_get_function (dev), pciid); addr += 8; for (i = 0; i < 6; i++, addr += 4) { diff --git a/normal/main.c b/normal/main.c index dcc91c649..f080a6971 100644 --- a/normal/main.c +++ b/normal/main.c @@ -509,7 +509,7 @@ grub_normal_reader_init (void) grub_normal_init_page (); grub_setcursor (1); - grub_printf (_("\ + grub_printf_ (N_("\ [ Minimal BASH-like line editing is supported. For the first word, TAB\n\ lists possible command completions. Anywhere else TAB lists possible\n\ device/file completions.%s ]\n\n"), diff --git a/normal/menu_entry.c b/normal/menu_entry.c index 7478c33ae..7a31c27af 100644 --- a/normal/menu_entry.c +++ b/normal/menu_entry.c @@ -836,7 +836,9 @@ store_completion (const char *item, grub_completion_type_t type, int count) } grub_gotoxy (0, GRUB_TERM_HEIGHT - 3); - grub_printf (" Possible %s are:\n ", what); + grub_printf (" "); + grub_printf_ (N_("Possible %s are:"), what); + grub_printf ("\n "); } /* Make sure that the completion buffer has enough room. */ @@ -997,7 +999,9 @@ run (struct screen *screen) } grub_cls (); - grub_printf (_(" Booting a command list\n\n")); + grub_printf (" "); + grub_printf_ (N_("Booting a command list")); + grub_printf ("\n\n"); /* Execute the script, line for line. */ @@ -1177,6 +1181,7 @@ grub_menu_entry_run (grub_menu_entry_t entry) grub_cls (); grub_print_error (); grub_errno = GRUB_ERR_NONE; - grub_printf (_("\nPress any key to continue...")); + grub_putchar ('\n'); + grub_printf_ (N_("Press any key to continue...")); (void) grub_getkey (); } diff --git a/normal/menu_text.c b/normal/menu_text.c index 4ff22e928..bb1f52203 100644 --- a/normal/menu_text.c +++ b/normal/menu_text.c @@ -39,11 +39,105 @@ static grub_uint8_t grub_color_menu_highlight; void grub_wait_after_message (void) { - grub_printf ("\nPress any key to continue..."); + grub_putchar ('\n'); + grub_printf_ (N_("Press any key to continue...")); (void) grub_getkey (); grub_putchar ('\n'); } +static void +print_spaces (int number_spaces) +{ + int i; + for (i = 0; i < number_spaces; i++) + grub_putchar (' '); +} + +static void +grub_print_ucs4 (const grub_uint32_t * str, + const grub_uint32_t * last_position) +{ + while (str < last_position) + { + grub_putcode (*str); + str++; + } +} + +static grub_ssize_t +getstringwidth (grub_uint32_t * str, const grub_uint32_t * last_position) +{ + grub_ssize_t width = 0; + + while (str < last_position) + { + width += grub_getcharwidth (*str); + str++; + } + return width; +} + +static void +print_message_indented (const char *msg) +{ + const int line_len = GRUB_TERM_WIDTH - grub_getcharwidth ('m') * 15; + + grub_uint32_t *unicode_msg; + + grub_ssize_t msg_len = grub_strlen (msg); + + unicode_msg = grub_malloc (msg_len * sizeof (*unicode_msg)); + + msg_len = grub_utf8_to_ucs4 (unicode_msg, msg_len, + (grub_uint8_t *) msg, -1, 0); + + if (!unicode_msg) + { + grub_printf ("print_message_indented ERROR1: %s", msg); + return; + } + + if (msg_len < 0) + { + grub_printf ("print_message_indented ERROR2: %s", msg); + grub_free (unicode_msg); + return; + } + + const grub_uint32_t *last_position = unicode_msg + msg_len; + + grub_uint32_t *current_position = unicode_msg; + + grub_uint32_t *next_new_line = unicode_msg; + + while (current_position < last_position) + { + next_new_line = (grub_uint32_t *) last_position; + + while (getstringwidth (current_position, next_new_line) > line_len + || (*next_new_line != ' ' && next_new_line > current_position && + next_new_line != last_position)) + { + next_new_line--; + } + + if (next_new_line == current_position) + { + next_new_line = (next_new_line + line_len > last_position) ? + (grub_uint32_t *) last_position : next_new_line + line_len; + } + + print_spaces (6); + grub_print_ucs4 (current_position, next_new_line); + grub_putchar ('\n'); + + next_new_line++; + current_position = next_new_line; + } + grub_free (unicode_msg); +} + + static void draw_border (void) { @@ -87,22 +181,33 @@ print_message (int nested, int edit) if (edit) { - grub_printf ("\n\ - Minimum Emacs-like screen editing is supported. TAB lists\n\ - completions. Press Ctrl-x to boot, Ctrl-c for a command-line\n\ - or ESC to return menu."); + grub_putchar ('\n'); + print_message_indented (_("Minimum Emacs-like screen editing is \ +supported. TAB lists completions. Press Ctrl-x to boot, Ctrl-c for a \ +command-line or ESC to return menu.")); } else { - grub_printf (_("\n\ - Use the %C and %C keys to select which entry is highlighted.\n"), - (grub_uint32_t) GRUB_TERM_DISP_UP, (grub_uint32_t) GRUB_TERM_DISP_DOWN); - grub_printf ("\ - Press enter to boot the selected OS, \'e\' to edit the\n\ - commands before booting or \'c\' for a command-line."); + const char *msg = _("Use the %C and %C keys to select which \ +entry is highlighted."); + char *msg_translated = + grub_malloc (sizeof (char) * grub_strlen (msg) + 1); + + grub_sprintf (msg_translated, msg, (grub_uint32_t) GRUB_TERM_DISP_UP, + (grub_uint32_t) GRUB_TERM_DISP_DOWN); + grub_putchar ('\n'); + print_message_indented (msg_translated); + + grub_free (msg_translated); + + print_message_indented (_("Press enter to boot the selected OS, \ +\'e\' to edit the commands before booting or \'c\' for a command-line.")); + if (nested) - grub_printf ("\n\ - ESC to return previous menu."); + { + grub_printf ("\n "); + grub_printf_ (N_("ESC to return previous menu.")); + } } } @@ -265,13 +370,17 @@ get_entry_number (const char *name) static void print_timeout (int timeout, int offset, int second_stage) { - /* NOTE: Do not remove the trailing space characters. - They are required to clear the line. */ - char *msg = " The highlighted entry will be booted automatically in %ds. "; + const char *msg = + _("The highlighted entry will be booted automatically in %ds."); + const int msg_localized_len = grub_strlen (msg); + const int number_spaces = GRUB_TERM_WIDTH - msg_localized_len - 3; + char *msg_end = grub_strchr (msg, '%'); - grub_gotoxy (second_stage ? (msg_end - msg) : 0, GRUB_TERM_HEIGHT - 3); + grub_gotoxy (second_stage ? (msg_end - msg + 3) : 3, GRUB_TERM_HEIGHT - 3); grub_printf (second_stage ? msg_end : msg, timeout); + print_spaces (second_stage ? number_spaces : 0); + grub_gotoxy (GRUB_TERM_CURSOR_X, GRUB_TERM_FIRST_ENTRY_Y + offset); grub_refresh (); }; @@ -360,8 +469,8 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot) if (timeout >= 0) { grub_gotoxy (0, GRUB_TERM_HEIGHT - 3); - grub_printf ("\ - "); + print_spaces (GRUB_TERM_WIDTH - 1); + grub_env_unset ("timeout"); grub_env_unset ("fallback"); grub_gotoxy (GRUB_TERM_CURSOR_X, GRUB_TERM_FIRST_ENTRY_Y + offset); @@ -517,7 +626,9 @@ static void notify_booting (grub_menu_entry_t entry, void *userdata __attribute__((unused))) { - grub_printf (" Booting \'%s\'\n\n", entry->title); + grub_printf (" "); + grub_printf_ (N_("Booting \'%s\'"), entry->title); + grub_printf ("\n\n"); } /* Callback invoked when a default menu entry executed because of a timeout @@ -527,7 +638,9 @@ static void notify_fallback (grub_menu_entry_t entry, void *userdata __attribute__((unused))) { - grub_printf ("\n Falling back to \'%s\'\n\n", entry->title); + grub_printf ("\n "); + grub_printf_ (N_("Falling back to \'%s\'"), entry->title); + grub_printf ("\n\n"); grub_millisleep (DEFAULT_ENTRY_ERROR_DELAY_MS); } @@ -541,7 +654,8 @@ notify_execution_failure (void *userdata __attribute__((unused))) grub_print_error (); grub_errno = GRUB_ERR_NONE; } - grub_printf ("\n Failed to boot default entries.\n"); + grub_printf ("\n "); + grub_printf_ (N_("Failed to boot default entries.\n")); grub_wait_after_message (); } diff --git a/po/ChangeLog b/po/ChangeLog deleted file mode 100644 index 6e537ccbf..000000000 --- a/po/ChangeLog +++ /dev/null @@ -1,43 +0,0 @@ -2009-11-24 Robert Millan - - * zh_CN.po: New file. - * LINGUAS: Add `zh_CN'. - -2009-11-23 Robert Millan - - * id.po: New file. - * LINGUAS: Add `id'. - -2009-11-23 Carles Pina i Estany - - * POTFILES: Add `normal/menu_text.c'. - * ca.po: Add new translations. - -2009-11-19 Robert Millan - - * POTFILES: Add `util/i386/pc/grub-setup.c'. - -2009-11-19 Robert Millan - - * 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 - - * POTFILES-shell: New file. List `util/grub.d/10_kfreebsd.in' - and `util/grub.d/10_linux.in'. - -2009-11-17 Robert Millan - - * ca.po: Fix PO-Revision-Date and Language-Team fields. - -2009-11-17 Robert Millan - - * LINGUAS: New file. - -2009-11-16 Robert Millan - - * POTFILES: New file. - * ca.po: New file. diff --git a/po/LINGUAS b/po/LINGUAS deleted file mode 100644 index 9bc3e53c1..000000000 --- a/po/LINGUAS +++ /dev/null @@ -1,3 +0,0 @@ -ca -id -zh_CN diff --git a/po/POTFILES b/po/POTFILES index c0fc40c30..7d213c357 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -11,4 +11,5 @@ util/mkisofs/rock.c util/mkisofs/tree.c util/mkisofs/write.c +normal/menu_entry.c normal/menu_text.c diff --git a/po/README b/po/README new file mode 100644 index 000000000..801599583 --- /dev/null +++ b/po/README @@ -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! diff --git a/po/ca.po b/po/ca.po deleted file mode 100644 index 4c1696282..000000000 --- a/po/ca.po +++ /dev/null @@ -1,1018 +0,0 @@ -# Copyright (C) 2009 Free Software Foundation, Inc -# This file is distributed under the same license as the GNU GRUB package. -# Robert Millan , 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: GNU GRUB\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-11-25 23:49+0100\n" -"PO-Revision-Date: 2009-11-17 12:26+0100\n" -"Last-Translator: Robert Millan \n" -"Language-Team: None \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 "" - -#: util/i386/pc/grub-mkimage.c:284 -#, c-format -msgid "Core image is too big (%p > %p)\n" -msgstr "" - -#: util/i386/pc/grub-mkimage.c:321 util/i386/pc/grub-setup.c:589 -#, c-format -msgid "Try ``%s --help'' for more information.\n" -msgstr "Proveu «%s --help» per a obtenir més informació.\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 "" - -#: 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 "" - -#: util/i386/pc/grub-setup.c:222 -#, c-format -msgid "The size of `%s' is too small" -msgstr "" - -#: util/i386/pc/grub-setup.c:224 -#, c-format -msgid "The size of `%s' is too large" -msgstr "" - -#: 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 "" - -#: 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 "" - -#: 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 "" - -#: 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 "" - -#: util/i386/pc/grub-setup.c:376 -msgid "Your embedding area is unusually small. core.img won't fit in it." -msgstr "" - -#: 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:441 -#, c-format -msgid "attempting to read the core image `%s' from GRUB" -msgstr "" - -#: util/i386/pc/grub-setup.c:442 -#, c-format -msgid "attempting to read the core image `%s' from GRUB again" -msgstr "" - -#: util/i386/pc/grub-setup.c:500 -#, c-format -msgid "Cannot read `%s' correctly" -msgstr "" - -#: util/i386/pc/grub-setup.c:513 -msgid "No terminator in the core image" -msgstr "" - -#: util/i386/pc/grub-setup.c:524 -msgid "Failed to read the first sector of the core image" -msgstr "" - -#: util/i386/pc/grub-setup.c:530 -msgid "Failed to read the rest sectors of the core image" -msgstr "" - -#: util/i386/pc/grub-setup.c:549 -#, c-format -msgid "Cannot open `%s'" -msgstr "" - -#: util/i386/pc/grub-setup.c:591 -#, 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:721 -#, c-format -msgid "No device is specified.\n" -msgstr "" - -#: util/i386/pc/grub-setup.c:727 -#, c-format -msgid "Unknown extra argument `%s'.\n" -msgstr "" - -#: util/i386/pc/grub-setup.c:744 -#, c-format -msgid "Invalid device `%s'.\n" -msgstr "" - -#: util/i386/pc/grub-setup.c:757 -#, c-format -msgid "Invalid root device `%s'" -msgstr "" - -#: util/i386/pc/grub-setup.c:770 -msgid "Cannot guess the root device. Specify the option ``--root-device''." -msgstr "" - -#: 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 "" - -#: 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 "" - -#: util/mkisofs/eltorito.c:221 -#, c-format -msgid "" -"\n" -"Size of boot image is %d sectors" -msgstr "" - -#: util/mkisofs/eltorito.c:227 -#, c-format -msgid "No emulation\n" -msgstr "" - -#: util/mkisofs/eltorito.c:235 -#, c-format -msgid "Emulating a 1.44 meg floppy\n" -msgstr "" - -#: util/mkisofs/eltorito.c:240 -#, c-format -msgid "Emulating a 2.88 meg floppy\n" -msgstr "" - -#: util/mkisofs/eltorito.c:245 -#, c-format -msgid "Emulating a 1.2 meg floppy\n" -msgstr "" - -#: util/mkisofs/eltorito.c:249 -#, c-format -msgid "" -"\n" -"Error - boot image is not the an allowable size.\n" -msgstr "" - -#: 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 "" - -#: util/mkisofs/eltorito.c:323 -#, c-format -msgid "Error writing to boot image (%s)" -msgstr "" - -#: 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:203 -msgid "Process all files (don't skip backup files)" -msgstr "" - -#: util/mkisofs/mkisofs.c:205 -msgid "Set Abstract filename" -msgstr "" - -#: util/mkisofs/mkisofs.c:207 -msgid "Set Application ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:209 -msgid "Set Bibliographic filename" -msgstr "" - -#: util/mkisofs/mkisofs.c:211 -msgid "Set Copyright filename" -msgstr "" - -#: util/mkisofs/mkisofs.c:213 -msgid "Set El Torito boot image name" -msgstr "" - -#: util/mkisofs/mkisofs.c:215 -msgid "Set El Torito boot catalog name" -msgstr "" - -#: util/mkisofs/mkisofs.c:217 -msgid "Patch Boot Info Table in El Torito boot image" -msgstr "" - -#: util/mkisofs/mkisofs.c:219 -msgid "Dummy option for backward compatibility" -msgstr "" - -#: util/mkisofs/mkisofs.c:221 -msgid "Enable floppy drive emulation for El Torito" -msgstr "" - -#: util/mkisofs/mkisofs.c:223 -msgid "Magic parameters from cdrecord" -msgstr "" - -#: util/mkisofs/mkisofs.c:225 -msgid "Omit trailing periods from filenames" -msgstr "" - -#: util/mkisofs/mkisofs.c:227 -msgid "Disable deep directory relocation" -msgstr "" - -#: util/mkisofs/mkisofs.c:229 -msgid "Follow symbolic links" -msgstr "" - -#: util/mkisofs/mkisofs.c:231 util/mkisofs/mkisofs.c:233 -msgid "Print option help" -msgstr "" - -#: util/mkisofs/mkisofs.c:235 -msgid "Print version information and exit" -msgstr "" - -#: util/mkisofs/mkisofs.c:237 -msgid "Hide ISO9660/RR file" -msgstr "" - -#: util/mkisofs/mkisofs.c:239 -msgid "Hide Joliet file" -msgstr "" - -#: util/mkisofs/mkisofs.c:241 -msgid "No longer supported" -msgstr "" - -#: util/mkisofs/mkisofs.c:243 -msgid "Generate Joliet directory information" -msgstr "" - -#: util/mkisofs/mkisofs.c:245 -msgid "Allow full 32 character filenames for iso9660 names" -msgstr "" - -#: util/mkisofs/mkisofs.c:247 -msgid "Allow iso9660 filenames to start with '.'" -msgstr "" - -#: util/mkisofs/mkisofs.c:249 -msgid "Re-direct messages to LOG_FILE" -msgstr "" - -#: util/mkisofs/mkisofs.c:251 -msgid "Exclude file name" -msgstr "" - -#: util/mkisofs/mkisofs.c:253 -msgid "Set path to previous session to merge" -msgstr "" - -#: util/mkisofs/mkisofs.c:255 -msgid "Omit version number from iso9660 filename" -msgstr "" - -#: util/mkisofs/mkisofs.c:257 -msgid "Inhibit splitting symlink components" -msgstr "" - -#: util/mkisofs/mkisofs.c:259 -msgid "Inhibit splitting symlink fields" -msgstr "" - -#: util/mkisofs/mkisofs.c:261 -msgid "Set output file name" -msgstr "" - -#: util/mkisofs/mkisofs.c:263 -msgid "Set Volume preparer" -msgstr "" - -#: util/mkisofs/mkisofs.c:265 -msgid "Print estimated filesystem size and exit" -msgstr "" - -#: util/mkisofs/mkisofs.c:267 -msgid "Set Volume publisher" -msgstr "" - -#: util/mkisofs/mkisofs.c:269 -msgid "Run quietly" -msgstr "" - -#: util/mkisofs/mkisofs.c:271 -msgid "Generate rationalized Rock Ridge directory information" -msgstr "" - -#: util/mkisofs/mkisofs.c:273 -msgid "Generate Rock Ridge directory information" -msgstr "" - -#: util/mkisofs/mkisofs.c:275 -msgid "Split output into files of approx. 1GB size" -msgstr "" - -#: util/mkisofs/mkisofs.c:277 -msgid "Set System ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:279 -msgid "" -"Generate translation tables for systems that don't understand long filenames" -msgstr "" - -#: util/mkisofs/mkisofs.c:281 -msgid "Verbose" -msgstr "" - -#: util/mkisofs/mkisofs.c:283 -msgid "Set Volume ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:285 -msgid "Set Volume set ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:287 -msgid "Set Volume set size" -msgstr "" - -#: util/mkisofs/mkisofs.c:289 -msgid "Set Volume set sequence number" -msgstr "" - -#: util/mkisofs/mkisofs.c:291 -msgid "Exclude file name (deprecated)" -msgstr "" - -#: util/mkisofs/mkisofs.c:297 -msgid "Override creation date" -msgstr "" - -#: util/mkisofs/mkisofs.c:299 -msgid "Override modification date" -msgstr "" - -#: util/mkisofs/mkisofs.c:301 -msgid "Override expiration date" -msgstr "" - -#: util/mkisofs/mkisofs.c:303 -msgid "Override effective date" -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 "" - -#: 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 "" - -#: util/mkisofs/mkisofs.c:476 -#, c-format -msgid "Options:\n" -msgstr "" - -#: util/mkisofs/mkisofs.c:706 -#, c-format -msgid "-i option no longer supported.\n" -msgstr "" - -#: 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 "" - -#: util/mkisofs/mkisofs.c:958 -msgid "Warning: getrlimit" -msgstr "" - -#: util/mkisofs/mkisofs.c:962 -msgid "Warning: setrlimit" -msgstr "" - -#: 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 "" - -#: 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 "" - -#: util/mkisofs/mkisofs.c:1073 -#, c-format -msgid "Unable to open previous session image %s\n" -msgstr "" - -#: 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 "" - -#: util/mkisofs/mkisofs.c:1265 -msgid "Unable to open disc image file\n" -msgstr "" - -#: 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 "" - -#: util/mkisofs/tree.c:811 -#, c-format -msgid "Unable to open directory %s\n" -msgstr "" - -#: util/mkisofs/tree.c:856 -#, c-format -msgid "Ignoring file %s\n" -msgstr "" - -#: 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 "" - -#: util/mkisofs/tree.c:961 -#, c-format -msgid "Non-existant or inaccessible: %s\n" -msgstr "" - -#: 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 "" - -#: util/mkisofs/tree.c:1028 -#, c-format -msgid "Already cached directory seen (%s)\n" -msgstr "" - -#: util/mkisofs/tree.c:1070 -#, c-format -msgid "File %s is not readable (%s) - ignoring\n" -msgstr "" - -#: 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 "" - -#: util/mkisofs/tree.c:1179 -#, c-format -msgid "Hidden from ISO9660 tree: %s\n" -msgstr "" - -#: util/mkisofs/tree.c:1191 -#, c-format -msgid "Hidden from Joliet tree: %s\n" -msgstr "" - -#: util/mkisofs/tree.c:1600 -#, c-format -msgid "Directories too deep %s\n" -msgstr "" - -#: util/mkisofs/tree.c:1632 -msgid "Unable to delete non-empty directory\n" -msgstr "" - -#: 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 "" - -#: 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 "" - -#: util/mkisofs/write.c:257 -#, c-format -msgid "cannot read %llu bytes from %s" -msgstr "" - -#: util/mkisofs/write.c:275 -#, c-format -msgid "%6.2f%% done, estimate finish %s" -msgstr "" - -#: 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 "" - -#: 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 "" - -#: 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 "" - -#: normal/menu_text.c:97 -#, c-format -msgid "" -"\n" -" Use the %C and %C keys to select which entry is highlighted.\n" -msgstr "" -"\n" -" Utilitzeu les tecles %C i %C per a seleccionar l'entrada ressaltada.\n" - -#: 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 "" diff --git a/po/id.po b/po/id.po deleted file mode 100644 index 421dd6034..000000000 --- a/po/id.po +++ /dev/null @@ -1,1149 +0,0 @@ -# Pesan Bahasa Indonesia untuk grub. -# Copyright (C) 2009 Free Software Foundation, Inc. -# This file is distributed under the same license as the grub package. -# Arif E. Nugroho , 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: grub 1.97+20091122\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-11-25 23:49+0100\n" -"PO-Revision-Date: 2009-11-22 20:00+0700\n" -"Last-Translator: Arif E. Nugroho \n" -"Language-Team: Indonesian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: util/i386/pc/grub-mkimage.c:65 -msgid "the core image is too small" -msgstr "image core terlalu kecil" - -#: util/i386/pc/grub-mkimage.c:77 -msgid "cannot compress the kernel image" -msgstr "tidak dapat mengkompress image kernel" - -#: util/i386/pc/grub-mkimage.c:138 -msgid "prefix is too long" -msgstr "awalan terlalu panjang" - -#: util/i386/pc/grub-mkimage.c:206 -msgid "the core image is too big" -msgstr "image core terlalu besar" - -#: util/i386/pc/grub-mkimage.c:211 -#, c-format -msgid "diskboot.img size must be %u bytes" -msgstr "besar diskboot.img seharusnya %u bytes" - -#: util/i386/pc/grub-mkimage.c:284 -#, c-format -msgid "Core image is too big (%p > %p)\n" -msgstr "Image core terlalu besar (%p >%p)\n" - -#: util/i386/pc/grub-mkimage.c:321 util/i386/pc/grub-setup.c:589 -#, c-format -msgid "Try ``%s --help'' for more information.\n" -msgstr "Coba ``%s --help'' untuk informasi lebih lanjut.\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 "" -"Penggunaan: grub-mkimage [PILIHAN]... [MODUL]\n" -"\n" -"Buat sebuah image GRUB yang dapat diboot.\n" -"\n" -" -d, --directory=DIR gunakan image dan modul dibawah DIR [baku=%s]\n" -" -p, --prefix=DIR set direktori grub_prefix [baku=%s]\n" -" -m, --memdisk=BERKAS tempatkan BERKAS sebagai sebuah image memdisk\n" -" -c, --config=BERKAS tempatkan BERKAS sebagai konfigurasi boot\n" -" -o, --output=BERKAS keluarkan sebuah image yang dihasilkan ke BERKAS " -"[baku=stdout]\n" -" -h, --help tampilkan pesan ini dan keluar\n" -" -V, --version tampilkan informasi versi dan keluar\n" -" -v, --verbose tampilkan informasi secara detail\n" -"\n" -"Laporkan bugs ke <%s>.\n" - -#: util/i386/pc/grub-mkimage.c:429 -#, c-format -msgid "cannot open %s" -msgstr "tidak dapat membuka %s" - -#: util/i386/pc/grub-setup.c:166 -msgid "The first sector of the core file is not sector-aligned" -msgstr "Sektor pertama dari berkas core tidak selaras secara sektor" - -#: util/i386/pc/grub-setup.c:180 -msgid "Non-sector-aligned data is found in the core file" -msgstr "Sektor-tidak-selaras data ditemukan dalam berkas core" - -#: util/i386/pc/grub-setup.c:194 -msgid "The sectors of the core file are too fragmented" -msgstr "Sektor dari berkas core terlalu terpotong potong" - -#: util/i386/pc/grub-setup.c:205 -#, c-format -msgid "The size of `%s' is not %u" -msgstr "Ukuran dari `%s' bukan %u" - -#: util/i386/pc/grub-setup.c:222 -#, c-format -msgid "The size of `%s' is too small" -msgstr "Ukuran dari `%s' terlalu kecil" - -#: util/i386/pc/grub-setup.c:224 -#, c-format -msgid "The size of `%s' is too large" -msgstr "Ukuran dari `%s' terlalu besar" - -#: util/i386/pc/grub-setup.c:261 -#, c-format -msgid "Unable to identify a filesystem in %s; safety check can't be performed" -msgstr "" -"Tidak dapat mengidentifikasikan sebuah sistem berkas dalam %s; pemeriksaan " -"keamanan tidak dapat dilakukan" - -#: 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 "" -"%s sepertinya berisi sebuah sistem berkas %s yang tidak diketahui untuk " -"mereserve ruang untuk boot gaya-DOS. Memasang GRUB disana dapat berakibat " -"KERUSAKAN SISTEM BERKAS jika data berharga dipaksa tulis oleh grub-setup (--" -"skip-fs-probe menonaktifkan pemeriksaan ini, gunakan sesuai resiko anda)" - -#: util/i386/pc/grub-setup.c:314 -msgid "No DOS-style partitions found" -msgstr "Tidak ditemukan gaya partisi 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 "" -"Mencoba memasang GRUB ke sebuah disk yang tidak berpartisi. Ini mungkin " -"bukan ide baik." - -#: 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 "" -"Mencoba memasang GRUB ke sebuah partisi daripada MBR. Ini mungkin bukan ide " -"baik." - -#: util/i386/pc/grub-setup.c:365 -msgid "" -"This msdos-style partition label has no post-MBR gap; embedding won't be " -"possible!" -msgstr "" -"Label partisi gaya msdos ini tidak memiliki post-MBR gap; penempatan tidak " -"memungkinkan!" - -#: util/i386/pc/grub-setup.c:367 -msgid "" -"This GPT partition label has no BIOS Boot Partition; embedding won't be " -"possible!" -msgstr "" -"Label partisi GPT ini tidak memiliki partisi boot BIOS; penempatan tidak " -"memungkinkan!" - -#: util/i386/pc/grub-setup.c:374 -msgid "Your core.img is unusually large. It won't fit in the embedding area." -msgstr "" -"Besar core.img anda sangat besar. Ini tidak akan masuk dalam area penempatan." - -#: util/i386/pc/grub-setup.c:376 -msgid "Your embedding area is unusually small. core.img won't fit in it." -msgstr "Penempatan anda sangat kecil. core.img tidak akan masuk disana." - -#: 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 "" -"Penempatan tidak memungkinkan, tetapi ini dibutuhkan ketika perangkat root " -"berada di sebuah array RAID atau volume LVM." - -#: 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 "" -"Penempatan tidak memungkinkan. GRUB hanya dapat dipasang di konfigurasi ini " -"dengan menggunakan blocklists. Akan tetapi, blocklists TIDAK DAPAT DIJAGAKAN " -"dan penggunaan ini tidak disarankan." - -#: util/i386/pc/grub-setup.c:425 -msgid "If you really want blocklists, use --force." -msgstr "Jika anda benar benar menginginkan blocklists, gunakan --force." - -#: util/i386/pc/grub-setup.c:441 -#, c-format -msgid "attempting to read the core image `%s' from GRUB" -msgstr "mencoba untuk membaca image core `%s' dari GRUB" - -#: util/i386/pc/grub-setup.c:442 -#, c-format -msgid "attempting to read the core image `%s' from GRUB again" -msgstr "mencoba untuk membaca image core `%s' dari GRUB lagi" - -#: util/i386/pc/grub-setup.c:500 -#, c-format -msgid "Cannot read `%s' correctly" -msgstr "Tidak dapat membaca `%s' secara benar" - -#: util/i386/pc/grub-setup.c:513 -msgid "No terminator in the core image" -msgstr "Tidak ada pengakhir dalam image core" - -#: util/i386/pc/grub-setup.c:524 -msgid "Failed to read the first sector of the core image" -msgstr "Gagal untuk membaca sektor pertama dari core image" - -#: util/i386/pc/grub-setup.c:530 -msgid "Failed to read the rest sectors of the core image" -msgstr "Gagal untuk membaca sektor selanjutnya dari image core" - -#: util/i386/pc/grub-setup.c:549 -#, c-format -msgid "Cannot open `%s'" -msgstr "Tidak dapat membuka `%s'" - -#: util/i386/pc/grub-setup.c:591 -#, 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 "" -"Penggunaan: grub-setup [PILIHAN]... PERANGKAT\n" -"\n" -"Konfigurasi image untuk boot dari PERANGKAT.\n" -"PERANGKAT harus berupa sebuah perangkat GRUB (e.g. ``(hd0,1)'').\n" -"\n" -" -b, --boot-image=BERKAS gunakan BERKAS sebagai image boot [baku=%s]\n" -" -c, --core-image=BERKAS gunakan BERKAS sebagai image core [baku=%s]\n" -" -d, --directory=DIR gunakan berkas GRUB dalam direktori DIR [baku=%s]\n" -" -m, --device-map=BERKAS gunakan BERKAS sebagai peta perangkat [baku=%s]\n" -" -r, --root-device=DEV gunakan DEV sebagai perangkat root [baku=ditebak]\n" -" -f, --force pasang walaupun masalah terdeteksi\n" -" -s, --skip-fs-probe jangan periksa untuk sistem berkas dalam " -"PERANGKAT\n" -" -h, --help tampilkan pesan bantuan ini dan keluar\n" -" -V, --version tampilkan informasi versi dan keluar\n" -" -v, --verbose tampilkan informasi secara detail\n" -"\n" -"Laporkan bugs ke <%s>.\n" - -#: util/i386/pc/grub-setup.c:721 -#, c-format -msgid "No device is specified.\n" -msgstr "Perangkat tidak dispesifikasikan.\n" - -#: util/i386/pc/grub-setup.c:727 -#, c-format -msgid "Unknown extra argument `%s'.\n" -msgstr "Argumen ekstra `%s' tidak diketahui.\n" - -#: util/i386/pc/grub-setup.c:744 -#, c-format -msgid "Invalid device `%s'.\n" -msgstr "Perangkat `%s' tidak valid.\n" - -#: util/i386/pc/grub-setup.c:757 -#, c-format -msgid "Invalid root device `%s'" -msgstr "Perangkat root `%s' tidak valid" - -#: util/i386/pc/grub-setup.c:770 -msgid "Cannot guess the root device. Specify the option ``--root-device''." -msgstr "" -"Tidak dapat menebak perangkat root. Spesifikasikan pilihan ``--root-device''." - -#: util/mkisofs/eltorito.c:96 -#, c-format -msgid "A boot catalog exists and appears corrupted.\n" -msgstr "Sebuah katalog boot ada dan mungkin terkorupsi.\n" - -#: util/mkisofs/eltorito.c:97 -#, c-format -msgid "Please check the following file: %s.\n" -msgstr "Mohon periksa berkas berikut: %s.\n" - -#: util/mkisofs/eltorito.c:98 -#, c-format -msgid "This file must be removed before a bootable CD can be done.\n" -msgstr "" -"Berkas ini mungkin telah terhapus sebelum sebuah CD bootable dapat " -"dilakukan.\n" - -#: util/mkisofs/eltorito.c:110 -#, c-format -msgid "Error creating boot catalog (%s)" -msgstr "Error membuat katalog boot (%s)" - -#: util/mkisofs/eltorito.c:114 -#, c-format -msgid "Error writing to boot catalog (%s)" -msgstr "Error menulis katalog boot (%s)" - -#: util/mkisofs/eltorito.c:144 -#, c-format -msgid "Boot catalog cannot be found!\n" -msgstr "Katalog boot tidak dapat ditemukan!\n" - -#: util/mkisofs/eltorito.c:158 -#, c-format -msgid "Boot image cannot be found!\n" -msgstr "Image boot tidak dapat ditemukan!\n" - -#: util/mkisofs/eltorito.c:221 -#, c-format -msgid "" -"\n" -"Size of boot image is %d sectors" -msgstr "" -"\n" -"Ukuran dari boot image adalah %d sektor" - -#: util/mkisofs/eltorito.c:227 -#, c-format -msgid "No emulation\n" -msgstr "Tidak ada emulasi\n" - -#: util/mkisofs/eltorito.c:235 -#, c-format -msgid "Emulating a 1.44 meg floppy\n" -msgstr "Mengemulasikan sebuah 1.44 meg floppy\n" - -#: util/mkisofs/eltorito.c:240 -#, c-format -msgid "Emulating a 2.88 meg floppy\n" -msgstr "Mengemulasikan sebuah 2.88 meg floppy\n" - -#: util/mkisofs/eltorito.c:245 -#, c-format -msgid "Emulating a 1.2 meg floppy\n" -msgstr "Mengemulasikan sebuah 1.2 meg floppy\n" - -#: util/mkisofs/eltorito.c:249 -#, c-format -msgid "" -"\n" -"Error - boot image is not the an allowable size.\n" -msgstr "" -"\n" -"Error - image boot tidak berukuran yang diperbolehkan.\n" - -#: util/mkisofs/eltorito.c:269 -msgid "Error opening boot catalog for update" -msgstr "Error membuka katalog boot untuk diperbarui" - -#: util/mkisofs/eltorito.c:275 util/mkisofs/eltorito.c:277 -msgid "Error writing to boot catalog" -msgstr "Error menulis ke katalog boot" - -#: util/mkisofs/eltorito.c:291 -#, c-format -msgid "Error opening boot image file '%s' for update" -msgstr "Error membuka berkas boot image '%s' untuk diperbarui" - -#: util/mkisofs/eltorito.c:299 -#, c-format -msgid "Odd alignment at non-end-of-file in boot image '%s'" -msgstr "Penyesuaian janggal di akhir-dari-berkas dalam image boot '%s'" - -#: util/mkisofs/eltorito.c:311 -#, c-format -msgid "Boot image file '%s' changed unexpectedly" -msgstr "Berkas image boot '%s' berubah secara tidak terduga" - -#: util/mkisofs/eltorito.c:323 -#, c-format -msgid "Error writing to boot image (%s)" -msgstr "Error menulis ke boot image (%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 "" -"Tidak dapat menghasilkan tabel jalur yang masuk akal - terlalu banyak " -"direktori (%d)\n" - -#: util/mkisofs/joliet.c:398 util/mkisofs/write.c:1017 -#, c-format -msgid "Entry %d not in path tables\n" -msgstr "Masukan %d tidak dalam tabel jalur\n" - -#: util/mkisofs/joliet.c:412 -#, c-format -msgid "Fatal goof - directory has amnesia\n" -msgstr "Fatal goof - direktori memiliki amnesia\n" - -#: util/mkisofs/joliet.c:478 -#, c-format -msgid "Joliet path table lengths do not match %d %d\n" -msgstr "Panjang tabel jalur joliet tidak cocok %d %d\n" - -#: util/mkisofs/joliet.c:530 -#, c-format -msgid "Unable to locate relocated directory\n" -msgstr "Tidak dapat menempatkan direktori yang ditempatkan\n" - -#: util/mkisofs/joliet.c:605 -#, c-format -msgid "Fatal goof - unable to find directory location\n" -msgstr "Fatal goof - tidak dapat menemukan lokasi direktori\n" - -#: util/mkisofs/joliet.c:654 -#, c-format -msgid "Unexpected joliet directory length %d %d %s\n" -msgstr "Panjang direktori joliet tidak terduga %d %d %s\n" - -#: util/mkisofs/mkisofs.c:203 -msgid "Process all files (don't skip backup files)" -msgstr "" - -#: util/mkisofs/mkisofs.c:205 -#, fuzzy -msgid "Set Abstract filename" -msgstr "String nama berkas abstrak terlalu panjang\n" - -#: util/mkisofs/mkisofs.c:207 -msgid "Set Application ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:209 -#, fuzzy -msgid "Set Bibliographic filename" -msgstr "String nama berkas bibliographic terlalu panjang\n" - -#: util/mkisofs/mkisofs.c:211 -#, fuzzy -msgid "Set Copyright filename" -msgstr "String nama berkas Hak Cipta terlalu panjang\n" - -#: util/mkisofs/mkisofs.c:213 -msgid "Set El Torito boot image name" -msgstr "" - -#: util/mkisofs/mkisofs.c:215 -#, fuzzy -msgid "Set El Torito boot catalog name" -msgstr "Error menulis ke katalog boot" - -#: util/mkisofs/mkisofs.c:217 -msgid "Patch Boot Info Table in El Torito boot image" -msgstr "" - -#: util/mkisofs/mkisofs.c:219 -msgid "Dummy option for backward compatibility" -msgstr "" - -#: util/mkisofs/mkisofs.c:221 -msgid "Enable floppy drive emulation for El Torito" -msgstr "" - -#: util/mkisofs/mkisofs.c:223 -msgid "Magic parameters from cdrecord" -msgstr "" - -#: util/mkisofs/mkisofs.c:225 -msgid "Omit trailing periods from filenames" -msgstr "" - -#: util/mkisofs/mkisofs.c:227 -#, fuzzy -msgid "Disable deep directory relocation" -msgstr "Fatal goof - tidak dapat menemukan lokasi direktori\n" - -#: util/mkisofs/mkisofs.c:229 -msgid "Follow symbolic links" -msgstr "" - -#: util/mkisofs/mkisofs.c:231 util/mkisofs/mkisofs.c:233 -msgid "Print option help" -msgstr "" - -#: util/mkisofs/mkisofs.c:235 -msgid "Print version information and exit" -msgstr "" - -#: util/mkisofs/mkisofs.c:237 -msgid "Hide ISO9660/RR file" -msgstr "" - -#: util/mkisofs/mkisofs.c:239 -msgid "Hide Joliet file" -msgstr "" - -#: util/mkisofs/mkisofs.c:241 -#, fuzzy -msgid "No longer supported" -msgstr "pilihan -i tidak lagi didukung.\n" - -#: util/mkisofs/mkisofs.c:243 -msgid "Generate Joliet directory information" -msgstr "" - -#: util/mkisofs/mkisofs.c:245 -msgid "Allow full 32 character filenames for iso9660 names" -msgstr "" - -#: util/mkisofs/mkisofs.c:247 -msgid "Allow iso9660 filenames to start with '.'" -msgstr "" - -#: util/mkisofs/mkisofs.c:249 -#, fuzzy -msgid "Re-direct messages to LOG_FILE" -msgstr "menredireksikan seluruh pesan ke %s\n" - -#: util/mkisofs/mkisofs.c:251 -msgid "Exclude file name" -msgstr "" - -#: util/mkisofs/mkisofs.c:253 -#, fuzzy -msgid "Set path to previous session to merge" -msgstr "Tidak dapat membuka sesi image sebelumnya %s\n" - -#: util/mkisofs/mkisofs.c:255 -msgid "Omit version number from iso9660 filename" -msgstr "" - -#: util/mkisofs/mkisofs.c:257 -msgid "Inhibit splitting symlink components" -msgstr "" - -#: util/mkisofs/mkisofs.c:259 -msgid "Inhibit splitting symlink fields" -msgstr "" - -#: util/mkisofs/mkisofs.c:261 -msgid "Set output file name" -msgstr "" - -#: util/mkisofs/mkisofs.c:263 -msgid "Set Volume preparer" -msgstr "" - -#: util/mkisofs/mkisofs.c:265 -msgid "Print estimated filesystem size and exit" -msgstr "" - -#: util/mkisofs/mkisofs.c:267 -msgid "Set Volume publisher" -msgstr "" - -#: util/mkisofs/mkisofs.c:269 -msgid "Run quietly" -msgstr "" - -#: util/mkisofs/mkisofs.c:271 -msgid "Generate rationalized Rock Ridge directory information" -msgstr "" - -#: util/mkisofs/mkisofs.c:273 -msgid "Generate Rock Ridge directory information" -msgstr "" - -#: util/mkisofs/mkisofs.c:275 -msgid "Split output into files of approx. 1GB size" -msgstr "" - -#: util/mkisofs/mkisofs.c:277 -msgid "Set System ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:279 -msgid "" -"Generate translation tables for systems that don't understand long filenames" -msgstr "" - -#: util/mkisofs/mkisofs.c:281 -msgid "Verbose" -msgstr "" - -#: util/mkisofs/mkisofs.c:283 -msgid "Set Volume ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:285 -msgid "Set Volume set ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:287 -msgid "Set Volume set size" -msgstr "" - -#: util/mkisofs/mkisofs.c:289 -#, fuzzy -msgid "Set Volume set sequence number" -msgstr "Set urutan nomor volume terlalu besar\n" - -#: util/mkisofs/mkisofs.c:291 -msgid "Exclude file name (deprecated)" -msgstr "" - -#: util/mkisofs/mkisofs.c:297 -msgid "Override creation date" -msgstr "" - -#: util/mkisofs/mkisofs.c:299 -msgid "Override modification date" -msgstr "" - -#: util/mkisofs/mkisofs.c:301 -msgid "Override expiration date" -msgstr "" - -#: util/mkisofs/mkisofs.c:303 -msgid "Override effective date" -msgstr "" - -#: util/mkisofs/mkisofs.c:373 -#, c-format -msgid "Using \"%s\"\n" -msgstr "Menggunakan \"%s\"\n" - -#: util/mkisofs/mkisofs.c:401 -#, c-format -msgid "%s:%d: name required\n" -msgstr "%s:%d: nama dibutuhkan\n" - -#: util/mkisofs/mkisofs.c:411 -#, c-format -msgid "%s:%d: equals sign required\n" -msgstr "%s:%d: tanda sama dibutuhkan\n" - -#: util/mkisofs/mkisofs.c:445 -#, c-format -msgid "%s:%d: field name \"%s\" unknown\n" -msgstr "%s:%d: nama daerah \"%s\" tidak diketahui\n" - -#: util/mkisofs/mkisofs.c:474 -#, c-format -msgid "Usage: %s [options] file...\n" -msgstr "Penggunaan: %s [pilihan] berkas...\n" - -#: util/mkisofs/mkisofs.c:476 -#, c-format -msgid "Options:\n" -msgstr "Pilihan:\n" - -#: util/mkisofs/mkisofs.c:706 -#, c-format -msgid "-i option no longer supported.\n" -msgstr "pilihan -i tidak lagi didukung.\n" - -#: util/mkisofs/mkisofs.c:720 -#, c-format -msgid "Required boot image pathname missing\n" -msgstr "Nama jalur boot image yang dibutuhkan hilang\n" - -#: util/mkisofs/mkisofs.c:729 -#, c-format -msgid "Required boot catalog pathname missing\n" -msgstr "Nama jalur katalog boot yang dibutuhkan hilang\n" - -#: util/mkisofs/mkisofs.c:737 -#, c-format -msgid "Ignoring -no-emul-boot (no-emulation is the default behaviour)\n" -msgstr "Mengabaikan -no-emul-boot (no-emulation adalah perilaku baku)\n" - -#: util/mkisofs/mkisofs.c:746 -#, c-format -msgid "Abstract filename string too long\n" -msgstr "String nama berkas abstrak terlalu panjang\n" - -#: util/mkisofs/mkisofs.c:754 -#, c-format -msgid "Application-id string too long\n" -msgstr "String ID-Aplikasi terlalu panjang\n" - -#: util/mkisofs/mkisofs.c:762 -#, c-format -msgid "Bibliographic filename string too long\n" -msgstr "String nama berkas bibliographic terlalu panjang\n" - -#: util/mkisofs/mkisofs.c:770 -#, c-format -msgid "Copyright filename string too long\n" -msgstr "String nama berkas Hak Cipta terlalu panjang\n" - -#: util/mkisofs/mkisofs.c:805 -#, c-format -msgid "Preparer string too long\n" -msgstr "String penyiap terlalu panjang\n" - -#: util/mkisofs/mkisofs.c:816 -#, c-format -msgid "Publisher string too long\n" -msgstr "String penerbit terlalu panjang\n" - -#: util/mkisofs/mkisofs.c:837 -#, c-format -msgid "System ID string too long\n" -msgstr "String ID sistem terlalu panjang\n" - -#: util/mkisofs/mkisofs.c:848 -#, c-format -msgid "Volume ID string too long\n" -msgstr "String ID volume terlalu penjang\n" - -#: util/mkisofs/mkisofs.c:856 -#, c-format -msgid "Volume set ID string too long\n" -msgstr "String ID set volume terlalu panjang\n" - -#: util/mkisofs/mkisofs.c:867 -#, c-format -msgid "Volume set sequence number too big\n" -msgstr "Set urutan nomor volume terlalu besar\n" - -#: 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 "string tanggal harus berupa 16 karakter.\n" - -#: util/mkisofs/mkisofs.c:958 -msgid "Warning: getrlimit" -msgstr "Peringatan: getrlimit" - -#: util/mkisofs/mkisofs.c:962 -msgid "Warning: setrlimit" -msgstr "Peringatan: setrlimit" - -#: util/mkisofs/mkisofs.c:978 -#, c-format -msgid "Multisession usage bug: Must specify -C if -M is used.\n" -msgstr "" -"Bug penggunaan multi sesi: Harus menspesifikasikan -C jika -M digunakan.\n" - -#: util/mkisofs/mkisofs.c:984 -#, c-format -msgid "" -"Warning: -C specified without -M: old session data will not be merged.\n" -msgstr "" -"Peringatan: -C dispesifikasikan tanpa -M: data sesi lama tidak akan " -"digabungkan.\n" - -#: util/mkisofs/mkisofs.c:1023 -#, c-format -msgid "can't open logfile: %s" -msgstr "tidak dapat membuka berkas log: %s" - -#: util/mkisofs/mkisofs.c:1027 -#, c-format -msgid "re-directing all messages to %s\n" -msgstr "menredireksikan seluruh pesan ke %s\n" - -#: util/mkisofs/mkisofs.c:1032 -#, c-format -msgid "can't open logfile: %s\n" -msgstr "tidak dapat membuka berkas log: %s\n" - -#: util/mkisofs/mkisofs.c:1073 -#, c-format -msgid "Unable to open previous session image %s\n" -msgstr "Tidak dapat membuka sesi image sebelumnya %s\n" - -#: util/mkisofs/mkisofs.c:1184 -#, c-format -msgid "Invalid node - %s\n" -msgstr "Node tidak valid -%s\n" - -#: util/mkisofs/mkisofs.c:1246 -msgid "Joliet tree sort failed.\n" -msgstr "Pengurutan pohon joliet gagal.\n" - -#: util/mkisofs/mkisofs.c:1261 -msgid "Unable to open /dev/null\n" -msgstr "Tidak dapat membuka /dev/null\n" - -#: util/mkisofs/mkisofs.c:1265 -msgid "Unable to open disc image file\n" -msgstr "Tidak dapat membuka berkas image disk\n" - -#: util/mkisofs/mkisofs.c:1387 -#, c-format -msgid "Max brk space used %x\n" -msgstr "Ruang maksimal brk yang digunakan %x\n" - -#: util/mkisofs/mkisofs.c:1390 -#, c-format -msgid "%llu extents written (%llu MiB)\n" -msgstr "%llu ekstensi ditulis (%llu MiB)\n" - -#: util/mkisofs/multi.c:161 -msgid "Seek error on old image\n" -msgstr "Error pencarian dalam image lama\n" - -#: util/mkisofs/multi.c:179 util/mkisofs/multi.c:250 -#, c-format -msgid "**Bad RR version attribute" -msgstr "**Atribut versi RR buruk" - -#: 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 "" -"Peringatan: Bukan Rock Ridge (-R) ataupun TRANS.TBL (-T) nama terjemahan " -"ditemukan dalam sesi sebelumnya. ISO (8.3) nama berkas yang telah " -"digunakan.\n" - -#: util/mkisofs/multi.c:764 -#, c-format -msgid "Read error on old image %s\n" -msgstr "Error membaca dalam image lama %s\n" - -#: util/mkisofs/multi.c:1084 -msgid "Special parameters for cdwrite not specified with -C\n" -msgstr "Parameter spesial untuk cdwrite tidak dispesifikasikan dengan -C\n" - -#: util/mkisofs/multi.c:1091 -msgid "Malformed cdwrite parameters\n" -msgstr "Parameter cdwrite salah format\n" - -#: util/mkisofs/rock.c:309 -#, c-format -msgid "symbolic link ``%s'' to long for one SL System Use Field, splitting" -msgstr "" -"link simbolik ``%s'' terlalu panjang untuk satu SL Sistem Menggunakan " -"Field, dipisahkan" - -#: util/mkisofs/rock.c:517 -#, c-format -msgid "Unable to insert transparent compressed file - name conflict\n" -msgstr "" -"Tidak dapat memasukan berkas terkompress secara transparan - konflik nama\n" - -#: util/mkisofs/rock.c:591 -msgid "Extension record too long\n" -msgstr "Rekaman ekstensi terlalu panjang\n" - -#: util/mkisofs/tree.c:226 util/mkisofs/write.c:565 util/mkisofs/write.c:1037 -msgid "Fatal goof\n" -msgstr "Fatal goof\n" - -#: util/mkisofs/tree.c:284 -#, c-format -msgid "Unable to generate unique name for file %s\n" -msgstr "Tidak dapat menghasilkan nama unik untuk berkas %s\n" - -#: util/mkisofs/tree.c:295 util/mkisofs/tree.c:317 -#, c-format -msgid "Using %s for %s%s%s (%s)\n" -msgstr "Menggunakan %s untuk %s%s%s (%s)\n" - -#: util/mkisofs/tree.c:441 -#, c-format -msgid "Fatal error - RR overflow for file %s\n" -msgstr "Fatal error -RR overflow untuk berkas %s\n" - -#: util/mkisofs/tree.c:449 -#, c-format -msgid "Unable to sort directory %s\n" -msgstr "Tidak dapat mengurutkan direktori %s\n" - -#: util/mkisofs/tree.c:480 -#, c-format -msgid "Translation table size mismatch %d %d\n" -msgstr "Besar tabel terjemahan tidak cocok %d %d\n" - -#: util/mkisofs/tree.c:746 -msgid "Unable to locate directory parent\n" -msgstr "Tidak dapat menempatkan direktori atasnya\n" - -#: util/mkisofs/tree.c:796 -#, c-format -msgid "Scanning %s\n" -msgstr "Memindai %s\n" - -#: util/mkisofs/tree.c:811 -#, c-format -msgid "Unable to open directory %s\n" -msgstr "Tidak dapat membuka direktori %s\n" - -#: util/mkisofs/tree.c:856 -#, c-format -msgid "Ignoring file %s\n" -msgstr "Mengabaikan berkas %s\n" - -#: util/mkisofs/tree.c:863 -msgid "Overflow of stat buffer\n" -msgstr "Overflow dari penyangga statistik\n" - -#: util/mkisofs/tree.c:876 -#, c-format -msgid "Excluded by match: %s\n" -msgstr "Diabaikan oleh kecocokan: %s\n" - -#: util/mkisofs/tree.c:891 -#, c-format -msgid "Excluded: %s\n" -msgstr "Diabaikan: %s\n" - -#: util/mkisofs/tree.c:961 -#, c-format -msgid "Non-existant or inaccessible: %s\n" -msgstr "Tidak ada atau tidak dapat diakses: %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 "" -"Tidak dapat memperoleh statistik berkas %s - mengabaikan dan melanjutkan.\n" - -#: util/mkisofs/tree.c:1003 -#, c-format -msgid "Symlink %s ignored - continuing.\n" -msgstr "Link simbolik %s diabaikan - melanjutkan.\n" - -#: util/mkisofs/tree.c:1028 -#, c-format -msgid "Already cached directory seen (%s)\n" -msgstr "Direktori yang telah dicache terlihat (%s)\n" - -#: util/mkisofs/tree.c:1070 -#, c-format -msgid "File %s is not readable (%s) - ignoring\n" -msgstr "Berkas %s tidak dapat dibaca (%s) - mengabaikan\n" - -#: util/mkisofs/tree.c:1083 -#, c-format -msgid "Directory loop - fatal goof (%s %lx %lu).\n" -msgstr "Loop direktori - fatal goof (%s %lx %lu).\n" - -#: util/mkisofs/tree.c:1093 -#, c-format -msgid "Unknown file type %s - ignoring and continuing.\n" -msgstr "Tipe berkas %s tidak diketahui - mengabaikan dan melanjutkan.\n" - -#: util/mkisofs/tree.c:1179 -#, c-format -msgid "Hidden from ISO9660 tree: %s\n" -msgstr "Tersembunyi dari pohon ISO9660: %s\n" - -#: util/mkisofs/tree.c:1191 -#, c-format -msgid "Hidden from Joliet tree: %s\n" -msgstr "Tersembunyi dari pohon joliet: %s\n" - -#: util/mkisofs/tree.c:1600 -#, c-format -msgid "Directories too deep %s\n" -msgstr "Direktori terlalu dalam %s\n" - -#: util/mkisofs/tree.c:1632 -msgid "Unable to delete non-empty directory\n" -msgstr "Tidak dapat menghapus direktori yang tidak kosong\n" - -#: util/mkisofs/tree.c:1655 -msgid "Unable to locate child directory in parent list\n" -msgstr "Tidak dapat menemukan direktori anak dalam daftar orang-tua\n" - -#: util/mkisofs/tree.c:1772 -#, c-format -msgid "call to search_tree_file with an absolute path, stripping\n" -msgstr "memanggil ke search_tree_file dengan sebuah jalur absolut, dipotong\n" - -#: util/mkisofs/tree.c:1773 -#, c-format -msgid "initial path separator. Hope this was intended...\n" -msgstr "jalur pemisah awal. Semoga ini yang diinginkan...\n" - -#: util/mkisofs/write.c:158 -#, c-format -msgid "Cannot open '%s'" -msgstr "Tidak dapat membuka '%s'" - -#: util/mkisofs/write.c:166 -#, c-format -msgid "cannot fwrite %llu*%llu\n" -msgstr "tidak dapat fwrite %llu*%llu\n" - -#: util/mkisofs/write.c:248 -#, c-format -msgid "cannot open %s\n" -msgstr "tidak dapat membuka %s\n" - -#: util/mkisofs/write.c:257 -#, c-format -msgid "cannot read %llu bytes from %s" -msgstr "tidak dapat membaca %llu bytes dari %s" - -#: util/mkisofs/write.c:275 -#, c-format -msgid "%6.2f%% done, estimate finish %s" -msgstr "%6.2f%% selesai, kira kira selesai %s" - -#: util/mkisofs/write.c:542 -#, c-format -msgid "Cache hit for %s%s%s\n" -msgstr "Cache kena untuk %s%s%s\n" - -#: util/mkisofs/write.c:896 -#, c-format -msgid "Unexpected directory length %d %d %s\n" -msgstr "Panjang direktori tidak terduga %d %d %s\n" - -#: util/mkisofs/write.c:908 -#, c-format -msgid "Continuation entry record length mismatch (%d %d).\n" -msgstr "Panjang masukan rekaman lanjutan tidak cocok (%d %d).\n" - -#: util/mkisofs/write.c:1072 -#, c-format -msgid "Path table lengths do not match %d %d\n" -msgstr "Panjang jalur tabel tidak cocok %d %d\n" - -#: util/mkisofs/write.c:1118 util/mkisofs/write.c:1128 -#, c-format -msgid "Total extents scheduled to be written = %llu\n" -msgstr "Total ekstensi telah terjadwal untuk ditulis = %llu\n" - -#: util/mkisofs/write.c:1145 -#, c-format -msgid "Total extents actually written = %llu\n" -msgstr "Total ekstensi yang sebenarnya tertulis = %llu\n" - -#: util/mkisofs/write.c:1154 -#, c-format -msgid "" -"Number of extents written different than what was predicted. Please fix.\n" -msgstr "" -"Jumlah dari ekstensi yang ditulis berbeda dari apa yang direncanakan. Mohon " -"betulkan.\n" - -#: util/mkisofs/write.c:1155 -#, c-format -msgid "Predicted = %d, written = %llu\n" -msgstr "Diperkirakan = %d, tertulis = %llu\n" - -#: util/mkisofs/write.c:1158 -#, c-format -msgid "Total translation table size: %d\n" -msgstr "Total besar tabel terjemahan: %d\n" - -#: util/mkisofs/write.c:1159 -#, c-format -msgid "Total rockridge attributes bytes: %d\n" -msgstr "Total atribut rockridge bytes: %d\n" - -#: util/mkisofs/write.c:1160 -#, c-format -msgid "Total directory bytes: %d\n" -msgstr "Total bytes direktori: %d\n" - -#: util/mkisofs/write.c:1161 -#, c-format -msgid "Path table size(bytes): %d\n" -msgstr "Ukuran tabel jalur(bytes): %d\n" - -#: normal/menu_text.c:97 -#, c-format -msgid "" -"\n" -" Use the %C and %C keys to select which entry is highlighted.\n" -msgstr "" - -#: util/grub.d/10_kfreebsd.in:40 -msgid "%s, with kFreeBSD %s" -msgstr "%s, dengan kFreeBSD %s" - -#: util/grub.d/10_linux.in:57 -msgid "%s, with Linux %s (recovery mode)" -msgstr "%s, dengan Linux %s (mode penyembuhan)" - -#: util/grub.d/10_linux.in:59 -msgid "%s, with Linux %s" -msgstr "%s, dengan Linux %s" - -#~ msgid "the size of memory disk is 0x%x" -#~ msgstr "besar dari disk memori 0x%0x" - -#~ msgid "the size of config file is 0x%x" -#~ msgstr "besar dari berkas konfig adalah 0x%x" - -#~ msgid "the total module size is 0x%x" -#~ msgstr "total besar modul adalah 0x%x" - -#~ msgid "the core size is 0x%x" -#~ msgstr "besar core adalah 0x%x" - -#~ msgid "the first sector is <%llu,%u,%u>" -#~ msgstr "sektor pertama adalah <%llu,%u,%u>" - -#~ msgid "saving <%llu,%u,%u> with the segment 0x%x" -#~ msgstr "menyimpan <%llu,%u,%u> dengan bagian 0x%x" - -#~ msgid "setting the root device to `%s'" -#~ msgstr "konfigurasi perangkat root ke `%s'" - -#~ msgid "dos partition is %d, bsd partition is %d" -#~ msgstr "partisi dos adalah %d, partisi bsd adalah %d" - -#~ msgid "the core image will be embedded at sector 0x%llx" -#~ msgstr "core image akan di ditempatkan di sektor 0x%llx" - -#~ msgid "" -#~ "succeeded in opening the core image but the size is different (%d != %d)" -#~ msgstr "sukses dalam membuka image core tetapi ukurannya berbeda (%d != %d)" - -#~ msgid "succeeded in opening the core image but cannot read %d bytes" -#~ msgstr "sukses dalam membuka image core tetapi tidak dapat membaca %d bytes" - -#~ msgid "succeeded in opening the core image but the data is different" -#~ msgstr "sukses dalam membuka image core tetapi data berbeda" - -#~ msgid "couldn't open the core image" -#~ msgstr "tidak dapat membuka image core" - -#~ msgid "error message = %s" -#~ msgstr "pesan error = %s" - -#~ msgid "opening the core image `%s'" -#~ msgstr "membuka image core `%s'" - -#~ msgid "guessing the root device failed, because of `%s'" -#~ msgstr "pendeteksian perangkat root gagal, karena `%s'" diff --git a/po/zh_CN.po b/po/zh_CN.po deleted file mode 100644 index 3489494d8..000000000 --- a/po/zh_CN.po +++ /dev/null @@ -1,1055 +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 , 2009. -# -msgid "" -msgstr "" -"Project-Id-Version: grub 1.97+20091122\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-11-25 23:49+0100\n" -"PO-Revision-Date: 2009-11-23 18:36+0800\n" -"Last-Translator: Aron Xu \n" -"Language-Team: Chinese (simplified) \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:589 -#, 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:441 -#, c-format -msgid "attempting to read the core image `%s' from GRUB" -msgstr "正在尝试从 GRUB 读取核心映像 `%s'" - -#: util/i386/pc/grub-setup.c:442 -#, c-format -msgid "attempting to read the core image `%s' from GRUB again" -msgstr "正在再次尝试从 GRUB 读取核心映像 `%s'" - -#: util/i386/pc/grub-setup.c:500 -#, c-format -msgid "Cannot read `%s' correctly" -msgstr "无法正确读取 `%s'" - -#: util/i386/pc/grub-setup.c:513 -msgid "No terminator in the core image" -msgstr "核心映像中没有终止符" - -#: util/i386/pc/grub-setup.c:524 -msgid "Failed to read the first sector of the core image" -msgstr "" - -#: util/i386/pc/grub-setup.c:530 -msgid "Failed to read the rest sectors of the core image" -msgstr "" - -#: util/i386/pc/grub-setup.c:549 -#, c-format -msgid "Cannot open `%s'" -msgstr "无法打开 `%s'" - -#: util/i386/pc/grub-setup.c:591 -#, 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:721 -#, c-format -msgid "No device is specified.\n" -msgstr "没有指定设备。\n" - -#: util/i386/pc/grub-setup.c:727 -#, c-format -msgid "Unknown extra argument `%s'.\n" -msgstr "未知的额外参数 `%s'。\n" - -#: util/i386/pc/grub-setup.c:744 -#, c-format -msgid "Invalid device `%s'.\n" -msgstr "无效的设备 `%s'。\n" - -#: util/i386/pc/grub-setup.c:757 -#, c-format -msgid "Invalid root device `%s'" -msgstr "无效的根设备 `%s'" - -#: util/i386/pc/grub-setup.c:770 -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:203 -msgid "Process all files (don't skip backup files)" -msgstr "" - -#: util/mkisofs/mkisofs.c:205 -msgid "Set Abstract filename" -msgstr "" - -#: util/mkisofs/mkisofs.c:207 -msgid "Set Application ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:209 -msgid "Set Bibliographic filename" -msgstr "" - -#: util/mkisofs/mkisofs.c:211 -msgid "Set Copyright filename" -msgstr "" - -#: util/mkisofs/mkisofs.c:213 -msgid "Set El Torito boot image name" -msgstr "" - -#: util/mkisofs/mkisofs.c:215 -msgid "Set El Torito boot catalog name" -msgstr "" - -#: util/mkisofs/mkisofs.c:217 -msgid "Patch Boot Info Table in El Torito boot image" -msgstr "" - -#: util/mkisofs/mkisofs.c:219 -msgid "Dummy option for backward compatibility" -msgstr "" - -#: util/mkisofs/mkisofs.c:221 -msgid "Enable floppy drive emulation for El Torito" -msgstr "" - -#: util/mkisofs/mkisofs.c:223 -msgid "Magic parameters from cdrecord" -msgstr "" - -#: util/mkisofs/mkisofs.c:225 -msgid "Omit trailing periods from filenames" -msgstr "" - -#: util/mkisofs/mkisofs.c:227 -msgid "Disable deep directory relocation" -msgstr "" - -#: util/mkisofs/mkisofs.c:229 -msgid "Follow symbolic links" -msgstr "" - -#: util/mkisofs/mkisofs.c:231 util/mkisofs/mkisofs.c:233 -msgid "Print option help" -msgstr "" - -#: util/mkisofs/mkisofs.c:235 -msgid "Print version information and exit" -msgstr "" - -#: util/mkisofs/mkisofs.c:237 -msgid "Hide ISO9660/RR file" -msgstr "" - -#: util/mkisofs/mkisofs.c:239 -msgid "Hide Joliet file" -msgstr "" - -#: util/mkisofs/mkisofs.c:241 -#, fuzzy -msgid "No longer supported" -msgstr "-i 选项已不再被支持。\n" - -#: util/mkisofs/mkisofs.c:243 -msgid "Generate Joliet directory information" -msgstr "" - -#: util/mkisofs/mkisofs.c:245 -msgid "Allow full 32 character filenames for iso9660 names" -msgstr "" - -#: util/mkisofs/mkisofs.c:247 -msgid "Allow iso9660 filenames to start with '.'" -msgstr "" - -#: util/mkisofs/mkisofs.c:249 -msgid "Re-direct messages to LOG_FILE" -msgstr "" - -#: util/mkisofs/mkisofs.c:251 -msgid "Exclude file name" -msgstr "" - -#: util/mkisofs/mkisofs.c:253 -#, fuzzy -msgid "Set path to previous session to merge" -msgstr "无法打开上一会话使用的映像 %s\n" - -#: util/mkisofs/mkisofs.c:255 -msgid "Omit version number from iso9660 filename" -msgstr "" - -#: util/mkisofs/mkisofs.c:257 -msgid "Inhibit splitting symlink components" -msgstr "" - -#: util/mkisofs/mkisofs.c:259 -msgid "Inhibit splitting symlink fields" -msgstr "" - -#: util/mkisofs/mkisofs.c:261 -msgid "Set output file name" -msgstr "" - -#: util/mkisofs/mkisofs.c:263 -msgid "Set Volume preparer" -msgstr "" - -#: util/mkisofs/mkisofs.c:265 -msgid "Print estimated filesystem size and exit" -msgstr "" - -#: util/mkisofs/mkisofs.c:267 -msgid "Set Volume publisher" -msgstr "" - -#: util/mkisofs/mkisofs.c:269 -msgid "Run quietly" -msgstr "" - -#: util/mkisofs/mkisofs.c:271 -msgid "Generate rationalized Rock Ridge directory information" -msgstr "" - -#: util/mkisofs/mkisofs.c:273 -msgid "Generate Rock Ridge directory information" -msgstr "" - -#: util/mkisofs/mkisofs.c:275 -msgid "Split output into files of approx. 1GB size" -msgstr "" - -#: util/mkisofs/mkisofs.c:277 -msgid "Set System ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:279 -msgid "" -"Generate translation tables for systems that don't understand long filenames" -msgstr "" - -#: util/mkisofs/mkisofs.c:281 -msgid "Verbose" -msgstr "" - -#: util/mkisofs/mkisofs.c:283 -msgid "Set Volume ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:285 -msgid "Set Volume set ID" -msgstr "" - -#: util/mkisofs/mkisofs.c:287 -msgid "Set Volume set size" -msgstr "" - -#: util/mkisofs/mkisofs.c:289 -msgid "Set Volume set sequence number" -msgstr "" - -#: util/mkisofs/mkisofs.c:291 -msgid "Exclude file name (deprecated)" -msgstr "" - -#: util/mkisofs/mkisofs.c:297 -msgid "Override creation date" -msgstr "" - -#: util/mkisofs/mkisofs.c:299 -msgid "Override modification date" -msgstr "" - -#: util/mkisofs/mkisofs.c:301 -msgid "Override expiration date" -msgstr "" - -#: util/mkisofs/mkisofs.c:303 -msgid "Override effective date" -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 "" - -#: normal/menu_text.c:97 -#, c-format -msgid "" -"\n" -" Use the %C and %C keys to select which entry is highlighted.\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'" diff --git a/util/elf/grub-mkimage.c b/util/elf/grub-mkimage.c index 535427208..5750543ad 100644 --- a/util/elf/grub-mkimage.c +++ b/util/elf/grub-mkimage.c @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2004,2005,2006,2007,2008 Free Software Foundation, Inc. + * Copyright (C) 2004,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 @@ -31,6 +31,9 @@ #include #include #include +#include + +#include "progname.h" #define GRUB_IEEE1275_NOTE_NAME "PowerPC" #define GRUB_IEEE1275_NOTE_TYPE 0x1275 @@ -325,10 +328,10 @@ static void usage (int status) { if (status) - fprintf (stderr, "Try ``grub-mkimage --help'' for more information.\n"); + fprintf (stderr, "Try ``%s --help'' for more information.\n", program_name); else printf ("\ -Usage: grub-mkimage -o FILE [OPTION]... [MODULES]\n\ +Usage: %s -o FILE [OPTION]... [MODULES]\n\ \n\ Make a bootable image of GRUB.\n\ \n\ @@ -342,7 +345,7 @@ Make a bootable image of GRUB.\n\ -v, --verbose print verbose messages\n\ \n\ Report bugs to <%s>.\n\ -", GRUB_LIBDIR, PACKAGE_BUGREPORT); +", program_name, GRUB_LIBDIR, PACKAGE_BUGREPORT); exit (status); } @@ -357,7 +360,10 @@ main (int argc, char *argv[]) char *memdisk = NULL; int chrp = 0; - progname = "grub-mkimage"; + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); while (1) { diff --git a/util/getroot.c b/util/getroot.c index a3c03d0b0..c6c229967 100644 --- a/util/getroot.c +++ b/util/getroot.c @@ -546,7 +546,7 @@ grub_util_get_grub_dev (const char *os_dev) if (q) *q = ','; - asprintf (&grub_dev, "md%s", p); + grub_dev = xasprintf ("md%s", p); free (p); } else if (os_dev[7] == '/' && os_dev[8] == 'd') @@ -561,7 +561,7 @@ grub_util_get_grub_dev (const char *os_dev) if (q) *q = ','; - asprintf (&grub_dev, "md%s", p); + grub_dev = xasprintf ("md%s", p); free (p); } else if (os_dev[7] >= '0' && os_dev[7] <= '9') @@ -574,7 +574,7 @@ grub_util_get_grub_dev (const char *os_dev) if (q) *q = ','; - asprintf (&grub_dev, "md%s", p); + grub_dev = xasprintf ("md%s", p); free (p); } else if (os_dev[7] == '/' && os_dev[8] >= '0' && os_dev[8] <= '9') @@ -587,7 +587,7 @@ grub_util_get_grub_dev (const char *os_dev) if (q) *q = ','; - asprintf (&grub_dev, "md%s", p); + grub_dev = xasprintf ("md%s", p); free (p); } else diff --git a/util/grub-editenv.c b/util/grub-editenv.c index 5b688d9cb..68fb23b15 100644 --- a/util/grub-editenv.c +++ b/util/grub-editenv.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -29,6 +30,8 @@ #include #include +#include "progname.h" + #define DEFAULT_ENVBLK_SIZE 1024 void @@ -104,7 +107,7 @@ create_envblk_file (const char *name) if (! buf) grub_util_error ("out of memory"); - asprintf (&namenew, "%s.new", name); + namenew = xasprintf ("%s.new", name); fp = fopen (namenew, "wb"); if (! fp) grub_util_error ("cannot open the file %s", namenew); @@ -252,7 +255,10 @@ main (int argc, char *argv[]) char *filename; char *command; - progname = "grub-editenv"; + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); /* Check for options. */ while (1) @@ -269,7 +275,7 @@ main (int argc, char *argv[]) break; case 'V': - printf ("%s (%s) %s\n", progname, PACKAGE_NAME, PACKAGE_VERSION); + printf ("%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION); return 0; case 'v': diff --git a/util/grub-emu.c b/util/grub-emu.c index 97f18865b..e65c8585e 100644 --- a/util/grub-emu.c +++ b/util/grub-emu.c @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2003,2004,2005,2006,2007,2008 Free Software Foundation, Inc. + * Copyright (C) 2003,2004,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 @@ -36,19 +36,22 @@ #include #include #include +#include #include +#include "progname.h" + /* Used for going back to the main function. */ static jmp_buf main_env; /* Store the prefix specified by an argument. */ -static char *prefix = 0; +static char *prefix = NULL; grub_addr_t grub_arch_modules_addr (void) { - return 0; + return NULL; } grub_err_t @@ -155,7 +158,10 @@ main (int argc, char *argv[]) volatile int hold = 0; int opt; - progname = "grub-emu"; + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); while ((opt = getopt_long (argc, argv, "r:d:m:vH:hV", options, 0)) != -1) switch (opt) @@ -178,7 +184,7 @@ main (int argc, char *argv[]) case 'h': return usage (0); case 'V': - printf ("%s (%s) %s\n", progname, PACKAGE_NAME, PACKAGE_VERSION); + printf ("%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION); return 0; default: return usage (1); @@ -193,7 +199,7 @@ main (int argc, char *argv[]) /* Wait until the ARGS.HOLD variable is cleared by an attached debugger. */ if (hold && verbosity > 0) printf ("Run \"gdb %s %d\", and set ARGS.HOLD to zero.\n", - progname, (int) getpid ()); + program_name, (int) getpid ()); while (hold) { if (hold > 0) diff --git a/util/grub-fstest.c b/util/grub-fstest.c index 1bb37066f..fa54fe414 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -1,7 +1,7 @@ /* grub-fstest.c - debug tool for filesystem driver */ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2008 Free Software Foundation, Inc. + * Copyright (C) 2008,2009 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -40,6 +41,8 @@ #include #include +#include "progname.h" + void grub_putchar (int c) { @@ -82,7 +85,7 @@ execute_command (char *name, int n, char **args) #define BUF_SIZE 32256 -static grub_off_t skip, leng; +static grub_disk_addr_t skip, leng; static void read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len)) @@ -137,7 +140,7 @@ read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len)) if (skip > file->size) { - grub_util_error ("invalid skip value %d."); + grub_util_error ("invalid skip value %lld.", (unsigned long long) skip); return; } @@ -346,10 +349,10 @@ static void usage (int status) { if (status) - fprintf (stderr, "Try ``grub-fstest --help'' for more information.\n"); + fprintf (stderr, "Try ``%s --help'' for more information.\n", program_name); else printf ("\ -Usage: grub-fstest [OPTION]... IMAGE_PATH COMMANDS\n\ +Usage: %s [OPTION]... IMAGE_PATH COMMANDS\n\ \n\ Debug tool for filesystem driver.\n\ \nCommands:\n\ @@ -369,7 +372,7 @@ Debug tool for filesystem driver.\n\ -V, --version print version information and exit\n\ -v, --verbose print verbose messages\n\ \n\ -Report bugs to <%s>.\n", PACKAGE_BUGREPORT); +Report bugs to <%s>.\n", program_name, PACKAGE_BUGREPORT); exit (status); } @@ -377,10 +380,13 @@ Report bugs to <%s>.\n", PACKAGE_BUGREPORT); int main (int argc, char *argv[]) { - char *debug_str = 0, *root = 0, *default_root, *alloc_root; + char *debug_str = NULL, *root = NULL, *default_root, *alloc_root; int i, cmd, num_opts, image_index, num_disks = 1; - progname = "grub-fstest"; + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); /* Find the first non option entry. */ for (num_opts = 1; num_opts < argc; num_opts++) @@ -442,7 +448,7 @@ main (int argc, char *argv[]) break; case 'V': - printf ("%s (%s) %s\n", progname, PACKAGE_NAME, PACKAGE_VERSION); + printf ("%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION); return 0; case 'v': diff --git a/util/grub-install.in b/util/grub-install.in index 5118e6e56..b9b0872fb 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -249,6 +249,14 @@ if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" done fi +# Copy gettext files +mkdir -p ${grubdir}/locale/ +for file in ${grubdir}/locale/*.mo ${pkglibdir}/locale/*.mo; do + if test -f "$file"; then + cp -f "$file" ${grubdir}/locale/ + fi +done + # Write device to a variable so we don't have to traverse /dev every time. grub_device=`$grub_probe --target=device ${grubdir}` diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in index 5b5dfd42a..8caf4f154 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in @@ -24,8 +24,12 @@ bindir=@bindir@ sbindir=@sbindir@ pkgdatadir=${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"` -grub_probe=${sbindir}/`echo grub-probe | sed ${transform}` -grub_mkrelpath=${bindir}/`echo grub-mkrelpath | sed ${transform}` +if test "x$grub_probe" = x; then + grub_probe=${sbindir}/`echo grub-probe | sed ${transform}` +fi +if test "x$grub_mkrelpath" = x; then + grub_mkrelpath=${bindir}/`echo grub-mkrelpath | sed ${transform}` +fi grub_warn () { diff --git a/util/grub-mkdevicemap.c b/util/grub-mkdevicemap.c index ec43b34b4..2b69f905e 100644 --- a/util/grub-mkdevicemap.c +++ b/util/grub-mkdevicemap.c @@ -1,7 +1,7 @@ /* grub-mkdevicemap.c - make a device map file automatically */ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008 Free Software Foundation, Inc. + * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,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 @@ -31,10 +31,13 @@ #include #include +#include #define _GNU_SOURCE 1 #include +#include "progname.h" + static void make_device_map (const char *device_map, int floppy_disks) { @@ -81,10 +84,10 @@ usage (int status) { if (status) fprintf (stderr, - "Try ``grub-mkdevicemap --help'' for more information.\n"); + "Try ``%s --help'' for more information.\n", program_name); else printf ("\ -Usage: grub-mkdevicemap [OPTION]...\n\ +Usage: %s [OPTION]...\n\ \n\ Generate a device map file automatically.\n\ \n\ @@ -96,7 +99,7 @@ Generate a device map file automatically.\n\ -v, --verbose print verbose messages\n\ \n\ Report bugs to <%s>.\n\ -", +", program_name, DEFAULT_DEVICE_MAP, PACKAGE_BUGREPORT); exit (status); @@ -108,7 +111,10 @@ main (int argc, char *argv[]) char *dev_map = 0; int floppy_disks = 1; - progname = "grub-mkdevicemap"; + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); /* Check for options. */ while (1) @@ -140,7 +146,7 @@ main (int argc, char *argv[]) break; case 'V': - printf ("%s (%s) %s\n", progname, PACKAGE_NAME, PACKAGE_VERSION); + printf ("%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION); return 0; case 'v': diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c index cfd6f9df3..9775e0803 100644 --- a/util/grub-mkfont.c +++ b/util/grub-mkfont.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -29,6 +30,8 @@ #include FT_FREETYPE_H #include +#include "progname.h" + #define GRUB_FONT_DEFAULT_SIZE 16 #define GRUB_FONT_RANGE_BLOCK 1024 @@ -90,10 +93,10 @@ static void usage (int status) { if (status) - fprintf (stderr, "Try ``grub-mkfont --help'' for more information.\n"); + fprintf (stderr, "Try ``%s --help'' for more information.\n", program_name); else printf ("\ -Usage: grub-mkfont [OPTIONS] FONT_FILES\n\ +Usage: %s [OPTIONS] FONT_FILES\n\ \nOptions:\n\ -o, --output=FILE_NAME set output file name\n\ -i, --index=N set face index\n\ @@ -109,7 +112,7 @@ Usage: grub-mkfont [OPTIONS] FONT_FILES\n\ -V, --version print version information and exit\n\ -v, --verbose print verbose messages\n\ \n\ -Report bugs to <%s>.\n", PACKAGE_BUGREPORT); +Report bugs to <%s>.\n", program_name, PACKAGE_BUGREPORT); exit (status); } @@ -363,8 +366,8 @@ write_font (struct grub_font_info *font_info, char *output_file) if (! style_name[0]) strcpy (style_name, " Regular"); - asprintf (&font_name, "%s %s %d", font_info->name, &style_name[1], - font_info->size); + font_name = xasprintf ("%s %s %d", font_info->name, &style_name[1], + font_info->size); write_string_section ("NAME", font_name, &offset, file); write_string_section ("FAMI", font_info->name, &offset, file); @@ -472,7 +475,10 @@ main (int argc, char *argv[]) memset (&font_info, 0, sizeof (font_info)); - progname = "grub-mkfont"; + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); /* Check for options. */ while (1) @@ -560,7 +566,7 @@ main (int argc, char *argv[]) break; case 'V': - printf ("%s (%s) %s\n", progname, PACKAGE_NAME, PACKAGE_VERSION); + printf ("%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION); return 0; case 'v': diff --git a/util/grub-mkrelpath.c b/util/grub-mkrelpath.c index 3deb4c412..a20109628 100644 --- a/util/grub-mkrelpath.c +++ b/util/grub-mkrelpath.c @@ -18,8 +18,11 @@ */ #include +#include #include +#include "progname.h" + static struct option options[] = { {"help", no_argument, 0, 'h'}, @@ -30,10 +33,10 @@ static void usage (int status) { if (status) - fprintf (stderr, "Try ``grub-mkrelpath --help'' for more information.\n"); + fprintf (stderr, "Try ``%s --help'' for more information.\n", program_name); else printf ("\ -Usage: grub-mkrelpath [OPTIONS] PATH\n\ +Usage: %s [OPTIONS] PATH\n\ \n\ Make a system path relative to it's root.\n\ \n\ @@ -41,7 +44,7 @@ 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); +Report bugs to <%s>.\n", program_name, PACKAGE_BUGREPORT); exit (status); } @@ -51,7 +54,10 @@ main (int argc, char *argv[]) { char *argument, *relpath; - progname = "grub-mkrelpath"; + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); /* Check for options. */ while (1) @@ -68,7 +74,7 @@ main (int argc, char *argv[]) break; case 'V': - printf ("%s (%s) %s\n", progname, PACKAGE_NAME, PACKAGE_VERSION); + printf ("%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION); return 0; default: diff --git a/util/grub-mkrescue.in b/util/grub-mkrescue.in index 51639ccb1..8e4a77f58 100644 --- a/util/grub-mkrescue.in +++ b/util/grub-mkrescue.in @@ -100,6 +100,13 @@ process_input_dir () cp -f "$file" ${iso9660_dir}/boot/grub/${target_cpu}-${platform}/ fi done + + mkdir -p ${iso9660_dir}/boot/grub/locale + for file in ${input_dir}/po/*.mo; do + if test -f "$file"; then + cp -f "$file" ${iso9660_dir}/boot/grub/locale/ + fi + done } if [ "${override_dir}" = "" ] ; then diff --git a/util/grub-pe2elf.c b/util/grub-pe2elf.c index 2b2a43ab7..fb370d9ec 100644 --- a/util/grub-pe2elf.c +++ b/util/grub-pe2elf.c @@ -1,7 +1,7 @@ /* grub-pe2elf.c - tool to convert pe image to elf. */ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2008 Free Software Foundation, Inc. + * Copyright (C) 2008,2009 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,10 +40,10 @@ static void usage (int status) { if (status) - fprintf (stderr, "Try ``grub-pe2elf --help'' for more information.\n"); + fprintf (stderr, "Try ``%s --help'' for more information.\n", program_name); else printf ("\ -Usage: grub-pe2elf [OPTIONS] input [output]\n\ +Usage: %s [OPTIONS] input [output]\n\ \n\ Tool to convert pe image to elf.\n\ \nOptions:\n\ @@ -51,7 +51,7 @@ Tool to convert pe image to elf.\n\ -V, --version print version information and exit\n\ -v, --verbose print verbose messages\n\ \n\ -Report bugs to <%s>.\n", PACKAGE_BUGREPORT); +Report bugs to <%s>.\n", program_name, PACKAGE_BUGREPORT); exit (status); } @@ -467,7 +467,7 @@ main (int argc, char *argv[]) char *image; FILE* fp; - progname = "grub-pe2elf"; + set_program_name (argv[0]); /* Check for options. */ while (1) @@ -484,7 +484,7 @@ main (int argc, char *argv[]) break; case 'V': - printf ("%s (%s) %s\n", progname, PACKAGE_NAME, PACKAGE_VERSION); + printf ("%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION); return 0; case 'v': diff --git a/util/grub-probe.c b/util/grub-probe.c index 1594d0dcb..6d421445c 100644 --- a/util/grub-probe.c +++ b/util/grub-probe.c @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -43,6 +44,8 @@ #define _GNU_SOURCE 1 #include +#include "progname.h" + enum { PRINT_FS, PRINT_FS_UUID, @@ -235,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); + grub_path = xasprintf ("(%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); @@ -303,10 +309,10 @@ usage (int status) { if (status) fprintf (stderr, - "Try ``grub-probe --help'' for more information.\n"); + "Try ``%s --help'' for more information.\n", program_name); else printf ("\ -Usage: grub-probe [OPTION]... [PATH|DEVICE]\n\ +Usage: %s [OPTION]... [PATH|DEVICE]\n\ \n\ Probe device information for a given path (or device, if the -d option is given).\n\ \n\ @@ -319,7 +325,7 @@ Probe device information for a given path (or device, if the -d option is given) -v, --verbose print verbose messages\n\ \n\ Report bugs to <%s>.\n\ -", +", program_name, DEFAULT_DEVICE_MAP, PACKAGE_BUGREPORT); exit (status); @@ -331,7 +337,10 @@ main (int argc, char *argv[]) char *dev_map = 0; char *argument; - progname = "grub-probe"; + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); /* Check for options. */ while (1) @@ -376,7 +385,7 @@ main (int argc, char *argv[]) break; case 'V': - printf ("%s (%s) %s\n", progname, PACKAGE_NAME, PACKAGE_VERSION); + printf ("%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION); return 0; case 'v': diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in index c6712e32f..1329bba1f 100644 --- a/util/grub.d/10_kfreebsd.in +++ b/util/grub.d/10_kfreebsd.in @@ -24,7 +24,7 @@ libdir=@libdir@ . ${bindir}/gettext.sh export TEXTDOMAIN=@PACKAGE@ -export TEXTDOMAINDIR=@LOCALEDIR@ +export TEXTDOMAINDIR=@localedir@ case "${GRUB_DISTRIBUTOR}" in Debian) OS="${GRUB_DISTRIBUTOR} GNU/kFreeBSD" ;; @@ -38,7 +38,7 @@ kfreebsd_entry () recovery="$3" # not used yet args="$4" # not used yet title="$(gettext "%s, with kFreeBSD %s")" - printf "menuentry \"${title}\" {" ${os} ${version} + printf "menuentry \"${title}\" {\n" "${os}" "${version}" if [ -z "${prepare_boot_cache}" ]; then prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")" fi diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index 8803055cf..5fea5338e 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -24,7 +24,7 @@ libdir=@libdir@ . ${bindir}/gettext.sh export TEXTDOMAIN=@PACKAGE@ -export TEXTDOMAINDIR=@LOCALEDIR@ +export TEXTDOMAINDIR=@localedir@ if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then OS=GNU/Linux @@ -58,7 +58,7 @@ linux_entry () else title="$(gettext "%s, with Linux %s")" fi - printf "menuentry \"${title}\" {" ${os} ${version} + printf "menuentry \"${title}\" {\n" "${os}" "${version}" if [ -z "${prepare_boot_cache}" ]; then prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")" fi diff --git a/util/hostdisk.c b/util/hostdisk.c index 04c412300..11caaf407 100644 --- a/util/hostdisk.c +++ b/util/hostdisk.c @@ -679,14 +679,14 @@ make_device_name (int drive, int dos_part, int bsd_part) char *bsd_part_str = NULL; if (dos_part >= 0) - asprintf (&dos_part_str, ",%d", dos_part + 1); + dos_part_str = xasprintf (",%d", dos_part + 1); if (bsd_part >= 0) - asprintf (&bsd_part_str, ",%c", dos_part + 'a'); + bsd_part_str = xasprintf (",%c", dos_part + 'a'); - asprintf (&ret, "%s%s%s", map[drive].drive, - dos_part_str ? : "", - bsd_part_str ? : ""); + ret = xasprintf ("%s%s%s", map[drive].drive, + dos_part_str ? : "", + bsd_part_str ? : ""); if (dos_part_str) free (dos_part_str); diff --git a/util/i386/efi/grub-mkimage.c b/util/i386/efi/grub-mkimage.c index 29a823e58..7f5141531 100644 --- a/util/i386/efi/grub-mkimage.c +++ b/util/i386/efi/grub-mkimage.c @@ -30,6 +30,7 @@ #include #include #include +#include "progname.h" #if GRUB_TARGET_WORDSIZE == 32 # define grub_le_to_cpu(val) grub_le_to_cpu32(val) @@ -54,12 +55,12 @@ align_pe32_section (Elf_Addr addr) /* Read the whole kernel image. Return the pointer to a read image, and store the size in bytes in *SIZE. */ static char * -read_kernel_module (const char *dir, size_t *size) +read_kernel_image (const char *dir, size_t *size) { char *kernel_image; char *kernel_path; - kernel_path = grub_util_get_path (dir, "kernel.mod"); + kernel_path = grub_util_get_path (dir, "kernel.img"); *size = grub_util_get_image_size (kernel_path); kernel_image = grub_util_read_image (kernel_path); free (kernel_path); @@ -944,7 +945,7 @@ convert_elf (const char *dir, char *prefix, FILE *out, char *mods[]) int i; /* Get the kernel image and check the format. */ - kernel_image = read_kernel_module (dir, &kernel_size); + kernel_image = read_kernel_image (dir, &kernel_size); e = (Elf_Ehdr *) kernel_image; if (! check_elf_header (e, kernel_size)) grub_util_error ("invalid ELF header"); @@ -1056,7 +1057,7 @@ main (int argc, char *argv[]) char *dir = NULL; char *prefix = NULL; - progname = "grub-mkimage"; + program_name = "grub-mkimage"; while (1) { diff --git a/util/misc.c b/util/misc.c index 765adf58b..5896da0c8 100644 --- a/util/misc.c +++ b/util/misc.c @@ -39,6 +39,8 @@ #include #include +#include "progname.h" + /* Include malloc.h, only if memalign is available. It is known that memalign is declared in malloc.h in all systems, if present. */ #ifdef HAVE_MEMALIGN @@ -50,7 +52,6 @@ #include #endif -char *progname = 0; int verbosity = 0; void @@ -58,7 +59,7 @@ grub_util_warn (const char *fmt, ...) { va_list ap; - fprintf (stderr, "%s: warn: ", progname); + fprintf (stderr, "%s: warn: ", program_name); va_start (ap, fmt); vfprintf (stderr, fmt, ap); va_end (ap); @@ -73,7 +74,7 @@ grub_util_info (const char *fmt, ...) { va_list ap; - fprintf (stderr, "%s: info: ", progname); + fprintf (stderr, "%s: info: ", program_name); va_start (ap, fmt); vfprintf (stderr, fmt, ap); va_end (ap); @@ -87,7 +88,7 @@ grub_util_error (const char *fmt, ...) { va_list ap; - fprintf (stderr, "%s: error: ", progname); + fprintf (stderr, "%s: error: ", program_name); va_start (ap, fmt); vfprintf (stderr, fmt, ap); va_end (ap); @@ -369,6 +370,19 @@ grub_arch_sync_caches (void *address __attribute__ ((unused)), { } +#ifndef HAVE_VASPRINTF + +int +vasprintf (char **buf, const char *fmt, va_list ap) +{ + /* Should be large enough. */ + *buf = xmalloc (512); + + return vsprintf (*buf, fmt, ap); +} + +#endif + #ifndef HAVE_ASPRINTF int @@ -377,11 +391,8 @@ asprintf (char **buf, const char *fmt, ...) int status; va_list ap; - /* Should be large enough. */ - *buf = xmalloc (512); - va_start (ap, fmt); - status = vsprintf (*buf, fmt, ap); + status = vasprintf (*buf, fmt, ap); va_end (ap); return status; @@ -389,6 +400,23 @@ asprintf (char **buf, const char *fmt, ...) #endif +char * +xasprintf (const char *fmt, ...) +{ + va_list ap; + char *result; + + va_start (ap, fmt); + if (vasprintf (&result, fmt, ap) < 0) + { + if (errno == ENOMEM) + grub_util_error ("out of memory"); + return NULL; + } + + return result; +} + #ifdef __MINGW32__ void sync (void) @@ -499,7 +527,17 @@ make_system_path_relative_to_its_root (const char *path) /* buf is another filesystem; we found it. */ if (st.st_dev != num) - break; + { + /* offset == 0 means path given is the mount point. */ + if (offset == 0) + { + free (buf); + free (buf2); + return strdup ("/"); + } + else + break; + } offset = p - buf; /* offset == 1 means root directory. */ diff --git a/util/mkisofs/mkisofs.c b/util/mkisofs/mkisofs.c index 4b43ba63b..803317ba0 100644 --- a/util/mkisofs/mkisofs.c +++ b/util/mkisofs/mkisofs.c @@ -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; } diff --git a/util/pci.c b/util/pci.c new file mode 100644 index 000000000..a0c1867be --- /dev/null +++ b/util/pci.c @@ -0,0 +1,76 @@ +/* pci.c - Generic PCI interfaces. */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2007,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 . + */ + +#include +#include +#include + +grub_pci_address_t +grub_pci_make_address (grub_pci_device_t dev, int reg) +{ + grub_pci_address_t ret; + ret.dev = dev; + ret.pos = reg << 2; + return ret; +} + +void +grub_pci_iterate (grub_pci_iteratefunc_t hook) +{ + struct pci_device_iterator *iter; + struct pci_slot_match slot; + struct pci_device *dev; + slot.domain = PCI_MATCH_ANY; + slot.bus = PCI_MATCH_ANY; + slot.dev = PCI_MATCH_ANY; + slot.func = PCI_MATCH_ANY; + iter = pci_slot_match_iterator_create (&slot); + while ((dev = pci_device_next (iter))) + hook (dev, dev->vendor_id | (dev->device_id << 16)); + pci_iterator_destroy (iter); +} + +void * +grub_pci_device_map_range (grub_pci_device_t dev, grub_addr_t base, + grub_size_t size) +{ + void *addr; + int err; + err = pci_device_map_range (dev, base, size, PCI_DEV_MAP_FLAG_WRITABLE, &addr); + if (err) + grub_util_error ("mapping 0x%x failed (error %d)\n", base, err); + return addr; +} + +void +grub_pci_device_unmap_range (grub_pci_device_t dev, void *mem, + grub_size_t size) +{ + pci_device_unmap_range (dev, mem, size); +} + +GRUB_MOD_INIT (pci) +{ + pci_system_init (); +} + +GRUB_MOD_FINI (pci) +{ + pci_system_cleanup (); +} diff --git a/util/sparc64/ieee1275/grub-install.in b/util/sparc64/ieee1275/grub-install.in new file mode 100644 index 000000000..5cfb858d7 --- /dev/null +++ b/util/sparc64/ieee1275/grub-install.in @@ -0,0 +1,276 @@ +#! /bin/sh + +# Install GRUB on your drive. +# Copyright (C) 1999,2000,2001,2002,2003,2004,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 . + +# Initialize some variables. +transform="@program_transform_name@" + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +sbindir=@sbindir@ +bindir=@bindir@ +libdir=@libdir@ +PACKAGE_NAME=@PACKAGE_NAME@ +PACKAGE_TARNAME=@PACKAGE_TARNAME@ +PACKAGE_VERSION=@PACKAGE_VERSION@ +target_cpu=@target_cpu@ +platform=@platform@ +pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}` + +grub_setup=${sbindir}/`echo grub-setup | sed ${transform}` +grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}` +grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}` +grub_probe=${sbindir}/`echo grub-probe | sed ${transform}` +rootdir= +grub_prefix=`echo /boot/grub | sed ${transform}` +modules= + +install_device= +no_floppy= +force_lba= +recheck=no +debug=no + +# Usage: usage +# Print the usage. +usage () { + cat <. +EOF +} + +# Check the arguments. +for option in "$@"; do + case "$option" in + -h | --help) + usage + exit 0 ;; + -v | --version) + echo "grub-install (GNU GRUB ${PACKAGE_VERSION})" + exit 0 ;; + --modules=*) + modules=`echo "$option" | sed 's/--modules=//'` ;; + --root-directory=*) + rootdir=`echo "$option" | sed 's/--root-directory=//'` ;; + --grub-setup=*) + grub_setup=`echo "$option" | sed 's/--grub-setup=//'` ;; + --grub-mkimage=*) + grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;; + --grub-mkdevicemap=*) + grub_mkdevicemap=`echo "$option" | sed 's/--grub-mkdevicemap=//'` ;; + --grub-probe=*) + grub_probe=`echo "$option" | sed 's/--grub-probe=//'` ;; + --no-floppy) + no_floppy="--no-floppy" ;; + --recheck) + recheck=yes ;; + # This is an undocumented feature... + --debug) + debug=yes ;; + -*) + echo "Unrecognized option \`$option'" 1>&2 + usage + exit 1 + ;; + *) + if test "x$install_device" != x; then + echo "More than one install_devices?" 1>&2 + usage + exit 1 + fi + install_device="${option}" ;; + esac +done + +# for make_system_path_relative_to_its_root() +. ${libdir}/grub/grub-mkconfig_lib + +if test "x$install_device" = x; then + echo "install_device not specified." 1>&2 + usage + exit 1 +fi + +# If the debugging feature is enabled, print commands. +setup_verbose= +if test $debug = yes; then + set -x + setup_verbose="--verbose" +fi + +# Initialize these directories here, since ROOTDIR was initialized. +bootdir=${rootdir}/boot +grubdir=${bootdir}/`echo grub | sed ${transform}` +device_map=${grubdir}/device.map + +grub_probe="${grub_probe} --device-map=${device_map}" + +# Check if GRUB is installed. +set $grub_setup dummy +if test -f "$1"; then + : +else + echo "$1: Not found." 1>&2 + exit 1 +fi + +set $grub_mkimage dummy +if test -f "$1"; then + : +else + echo "$1: Not found." 1>&2 + exit 1 +fi + +set $grub_mkdevicemap dummy +if test -f "$1"; then + : +else + echo "$1: Not found." 1>&2 + exit 1 +fi + +# Create the GRUB directory if it is not present. +test -d "$bootdir" || mkdir "$bootdir" || exit 1 +test -d "$grubdir" || mkdir "$grubdir" || exit 1 + +# If --recheck is specified, remove the device map, if present. +if test $recheck = yes; then + rm -f $device_map +fi + +# Create the device map file if it is not present. +if test -f "$device_map"; then + : +else + # Create a safe temporary file. + test -n "$mklog" && log_file=`$mklog` + + $grub_mkdevicemap --device-map=$device_map $no_floppy || exit 1 +fi + +# Make sure that there is no duplicated entry. +tmp=`sed -n '/^([fh]d[0-9]*)/s/\(^(.*)\).*/\1/p' $device_map \ + | sort | uniq -d | sed -n 1p` +if test -n "$tmp"; then + echo "The drive $tmp is defined multiple times in the device map $device_map" 1>&2 + exit 1 +fi + +# Copy the GRUB images to the GRUB directory. +for file in ${grubdir}/*.mod ${grubdir}/*.lst ${grubdir}/*.img; do + if test -f $file && [ "`basename $file`" != menu.lst ]; then + rm -f $file || exit 1 + fi +done +for file in ${pkglibdir}/*.mod ${pkglibdir}/*.lst; do + cp -f $file ${grubdir} || exit 1 +done + +for file in ${pkglibdir}/*.img; do + cp -f $file ${grubdir} || exit 1 +done + +# Write device to a variable so we don't have to traverse /dev every time. +grub_device=`$grub_probe --target=device ${grubdir}` + +# Create the core image. First, auto-detect the filesystem module. +fs_module=`$grub_probe --target=fs --device ${grub_device}` +if test "x$fs_module" = x -a "x$modules" = x; then + echo "Auto-detection of a filesystem module failed." 1>&2 + echo "Please specify the module with the option \`--modules' explicitly." 1>&2 + exit 1 +fi + +# Then the partition map module. In order to support partition-less media, +# this command is allowed to fail (--target=fs already grants us that the +# filesystem will be accessible). +partmap_module=`$grub_probe --target=partmap --device ${grub_device} 2> /dev/null` + +# Device abstraction module, if any (lvm, raid). +devabstraction_module=`$grub_probe --target=abstraction --device ${grub_device}` + +modules="$modules $fs_module $partmap_module $devabstraction_module" + +prefix_drive= +if [ "x${devabstraction_module}" = "x" ] ; then + if echo "${install_device}" | grep -qx "(.*)" ; then + install_drive="${install_device}" + else + install_drive="`$grub_probe --target=drive --device ${install_device}`" + fi + grub_drive="`$grub_probe --target=drive --device ${grub_device}`" + + # Strip partition number + install_drive="`echo ${install_drive} | sed -e 's/\([^\]\),[0-9]*/\1/g'`" + grub_drive="`echo ${grub_drive} | sed -e 's/\([^\]\),[0-9]*/\1/g'`" + if [ "x${grub_drive}" != "x${install_drive}" ] ; then + uuid="`$grub_probe --target=fs_uuid --device ${grub_device}`" + if [ "x${uuid}" = "x" ] ; then + echo "You attempted a cross-disk install, but the filesystem containing ${grubdir} does not support UUIDs." 1>&2 + exit 1 + fi + prefix_drive="(UUID=${uuid})" + modules="$modules fs_uuid" + fi +else + prefix_drive=`$grub_probe --target=drive --device ${grub_device}` +fi + +relative_grubdir=`make_system_path_relative_to_its_root ${grubdir}` || exit 1 +if [ "x${relative_grubdir}" = "x" ] ; then + relative_grubdir=/ +fi + +$grub_mkimage --output=${grubdir}/core.img --prefix=${prefix_drive}${relative_grubdir} $modules || exit 1 + +# Now perform the installation. +$grub_setup ${setup_verbose} --directory=${grubdir} --device-map=${device_map} \ + ${install_device} || exit 1 + +# Prompt the user to check if the device map is correct. +echo "Installation finished. No error reported." +echo "This is the contents of the device map $device_map." +echo "Check if this is correct or not. If any of the lines is incorrect," +echo "fix it and re-run the script \`grub-install'." +echo + +cat $device_map + +# Bye. +exit 0 diff --git a/util/sparc64/ieee1275/grub-mkimage.c b/util/sparc64/ieee1275/grub-mkimage.c index 0a611da8f..d756586af 100644 --- a/util/sparc64/ieee1275/grub-mkimage.c +++ b/util/sparc64/ieee1275/grub-mkimage.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -34,6 +35,8 @@ #define _GNU_SOURCE 1 #include +#include "progname.h" + static void compress_kernel (char *kernel_img, size_t kernel_size, char **core_img, size_t *core_size) @@ -188,10 +191,10 @@ static void usage (int status) { if (status) - fprintf (stderr, "Try ``grub-mkimage --help'' for more information.\n"); + fprintf (stderr, "Try ``%s --help'' for more information.\n", program_name); else printf ("\ -Usage: grub-mkimage [OPTION]... [MODULES]\n\ +Usage: %s [OPTION]... [MODULES]\n\ \n\ Make a bootable image of GRUB.\n\ \n\ @@ -204,7 +207,7 @@ Make a bootable image of GRUB.\n\ -v, --verbose print verbose messages\n\ \n\ Report bugs to <%s>.\n\ -", GRUB_LIBDIR, DEFAULT_DIRECTORY, PACKAGE_BUGREPORT); +", program_name, GRUB_LIBDIR, DEFAULT_DIRECTORY, PACKAGE_BUGREPORT); exit (status); } @@ -218,7 +221,11 @@ main (int argc, char *argv[]) char *memdisk = NULL; FILE *fp = stdout; - progname = "grub-mkimage"; + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + while (1) { int c = getopt_long (argc, argv, "d:p:m:o:hVv", options, 0); diff --git a/util/sparc64/ieee1275/grub-ofpathname.c b/util/sparc64/ieee1275/grub-ofpathname.c index 358608b02..166ce4cbe 100644 --- a/util/sparc64/ieee1275/grub-ofpathname.c +++ b/util/sparc64/ieee1275/grub-ofpathname.c @@ -20,15 +20,22 @@ #include #include +#include + +#include "progname.h" + int main(int argc, char **argv) { char *of_path; - progname = "grub-ofpathname"; + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); if (argc != 2) { - printf("Usage: grub-ofpathname DEVICE\n"); + printf("Usage: %s DEVICE\n", program_name); return 1; } diff --git a/util/sparc64/ieee1275/grub-setup.c b/util/sparc64/ieee1275/grub-setup.c index 7008147bf..ade1bd595 100644 --- a/util/sparc64/ieee1275/grub-setup.c +++ b/util/sparc64/ieee1275/grub-setup.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -49,6 +50,8 @@ #define _GNU_SOURCE 1 #include +#include "progname.h" + /* This program fills in various fields inside of the 'boot' and 'core' * image files. * @@ -401,10 +404,10 @@ static void usage (int status) { if (status) - fprintf (stderr, "Try ``grub-setup --help'' for more information.\n"); + fprintf (stderr, "Try ``%s --help'' for more information.\n", program_name); else printf ("\ -Usage: grub-setup [OPTION]... DEVICE\n\ +Usage: %s [OPTION]... DEVICE\n\ \n\ Set up images to boot from DEVICE.\n\ DEVICE must be a GRUB device (e.g. ``(hd0,1)'').\n\ @@ -419,7 +422,7 @@ DEVICE must be a GRUB device (e.g. ``(hd0,1)'').\n\ -v, --verbose print verbose messages\n\ \n\ Report bugs to <%s>.\n\ -", +", program_name, DEFAULT_BOOT_FILE, DEFAULT_CORE_FILE, DEFAULT_DIRECTORY, DEFAULT_DEVICE_MAP, PACKAGE_BUGREPORT); @@ -616,7 +619,10 @@ main (int argc, char *argv[]) { struct grub_setup_info ginfo; - progname = "grub-setup"; + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); init_info (&ginfo); if (!parse_options (&ginfo, argc, argv)) diff --git a/video/efi_gop.c b/video/efi_gop.c new file mode 100644 index 000000000..e2eb2f7ae --- /dev/null +++ b/video/efi_gop.c @@ -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 . + */ + +#define grub_video_render_target grub_video_fbrender_target + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +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 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); +} diff --git a/video/efi_fb.c b/video/efi_uga.c similarity index 87% rename from video/efi_fb.c rename to video/efi_uga.c index 2faff12f9..9bca64306 100644 --- a/video/efi_fb.c +++ b/video/efi_uga.c @@ -84,21 +84,22 @@ find_framebuf (grub_uint32_t *fb_base, grub_uint32_t *line_len) { int found = 0; - auto int NESTED_FUNC_ATTR find_card (int bus, int dev, int func, + auto int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid); - int NESTED_FUNC_ATTR find_card (int bus, int dev, int func, + int NESTED_FUNC_ATTR find_card (grub_pci_device_t dev, grub_pci_id_t pciid) { grub_pci_address_t addr; - addr = grub_pci_make_address (bus, dev, func, 2); + addr = grub_pci_make_address (dev, 2); if (grub_pci_read (addr) >> 24 == 0x3) { int i; grub_dprintf ("fb", "Display controller: %d:%d.%d\nDevice id: %x\n", - bus, dev, func, pciid); + grub_pci_get_bus (dev), grub_pci_get_device (dev), + grub_pci_get_function (dev), pciid); addr += 8; for (i = 0; i < 6; i++, addr += 4) { @@ -183,20 +184,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 depth; @@ -269,14 +270,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 +286,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 +297,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 +318,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); }