From 3affd0ece8f6af300e6b33eb796da59bd46037a2 Mon Sep 17 00:00:00 2001 From: phcoder Date: Wed, 14 Oct 2009 10:11:59 +0200 Subject: [PATCH 01/48] libpci initial stuff --- Makefile.in | 2 ++ bus/pci.c | 23 ++++++++--------- bus/usb/ohci.c | 6 ++--- bus/usb/uhci.c | 6 ++--- commands/lspci.c | 11 +++++--- conf/i386-pc.rmk | 7 ++++- configure.ac | 11 +++++++- disk/ata.c | 11 ++++---- include/grub/i386/pci.h | 5 ++++ include/grub/pci.h | 45 ++++++++++++++++++++++++++------ util/pci.c | 57 +++++++++++++++++++++++++++++++++++++++++ 11 files changed, 147 insertions(+), 37 deletions(-) create mode 100644 util/pci.c diff --git a/Makefile.in b/Makefile.in index e0edbdb04..4e45dc569 100644 --- a/Makefile.in +++ b/Makefile.in @@ -100,12 +100,14 @@ endif AWK = @AWK@ LIBCURSES = @LIBCURSES@ LIBUSB = @LIBUSB@ +LIBPCI = @LIBPCI@ YACC = @YACC@ UNIFONT_BDF = @UNIFONT_BDF@ # Options. enable_grub_emu = @enable_grub_emu@ 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@ 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/lspci.c b/commands/lspci.c index 5b3360a37..10618c7a9 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, @@ -142,6 +143,8 @@ grub_lspci_iter (int bus, int dev, int func, grub_pci_id_t pciid) grub_printf ("\n"); + grub_pci_close (dev); + return 0; } diff --git a/conf/i386-pc.rmk b/conf/i386-pc.rmk index bf8fbfb9d..107ae7a22 100644 --- a/conf/i386-pc.rmk +++ b/conf/i386-pc.rmk @@ -165,7 +165,12 @@ grub_emu_LDFLAGS = $(LIBCURSES) ifeq ($(enable_grub_emu_usb), yes) grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c \ commands/usbtest.c -grub_emu_LDFLAGS += $(LIBCURSES) $(LIBUSB) +grub_emu_LDFLAGS += $(LIBUSB) +endif + +ifeq ($(enable_grub_emu_pci), yes) +grub_emu_SOURCES += util/pci.c commands/lspci.c +grub_emu_LDFLAGS += $(LIBPCI) endif # Scripts. diff --git a/configure.ac b/configure.ac index 3e4da66c8..5a98e3433 100644 --- a/configure.ac +++ b/configure.ac @@ -499,6 +499,10 @@ AC_ARG_ENABLE([grub-emu], 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 x"$enable_grub_emu" = xno ; then grub_emu_excuse="explicitly disabled" fi @@ -541,7 +545,7 @@ AC_CHECK_LIB([usb], [usb_claim_interface], [LIBUSB="-lusb"], AC_CHECK_HEADERS([usb.h], [], [grub_emu_usb_excuse=["need libusb headers"]]) [fi] -if test x"enable_grub_emu_usb" = xyes && test x"$grub_emu_usb_excuse" != x ; then +if test x"$enable_grub_emu_usb" = xyes && test x"$grub_emu_usb_excuse" != x ; then AC_MSG_ERROR([USB support for grub-emu was explicitly requested but can't be compiled]) fi if test x"$grub_emu_usb_excuse" = x ; then @@ -550,8 +554,13 @@ else enable_grub_emu_usb=no fi +if test x"$enable_grub_emu_pci" != xyes ; then + enable_grub_emu_pci = no +fi + AC_SUBST([enable_grub_emu]) AC_SUBST([enable_grub_emu_usb]) +AC_SUBST([enable_grub_emu_pci]) AC_ARG_ENABLE([grub-fstest], [AS_HELP_STRING([--enable-grub-fstest], diff --git a/disk/ata.c b/disk/ata.c index 78d396526..ef6b44184 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/include/grub/i386/pci.h b/include/grub/i386/pci.h index 996f64245..c8de9ff32 100644 --- a/include/grub/i386/pci.h +++ b/include/grub/i386/pci.h @@ -67,4 +67,9 @@ 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_close (grub_pci_device_t dev __attribute__ ((unused))) +{ +} + #endif /* GRUB_CPU_PCI_H */ 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/util/pci.c b/util/pci.c new file mode 100644 index 000000000..99962c31d --- /dev/null +++ b/util/pci.c @@ -0,0 +1,57 @@ +/* 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 + +struct pci_access *acc = 0; + +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_close (grub_pci_device_t dev) +{ + pci_free_dev (dev); +} + +void +grub_pci_iterate (grub_pci_iteratefunc_t hook) +{ + grub_pci_device_t cur; + for (cur = acc->devices; cur; cur = cur->next) + hook (cur, cur->vendor_id|(cur->device_id << 16)); +} + +GRUB_MOD_INIT (pci) +{ + acc = pci_alloc (); + pci_init (acc); +} + +GRUB_MOD_FINI (pci) +{ + pci_cleanup (acc); +} From 325c8258e7c31a5acea560cd9e9965a3a9d933c3 Mon Sep 17 00:00:00 2001 From: phcoder Date: Wed, 14 Oct 2009 10:36:37 +0200 Subject: [PATCH 02/48] lspci works in grub-emu --- commands/lspci.c | 6 +-- configure.ac | 35 +++++++++++++++- include/grub/i386/pci.h | 5 --- include/grub/pciutils.h | 88 +++++++++++++++++++++++++++++++++++++++++ util/pci.c | 7 +--- 5 files changed, 125 insertions(+), 16 deletions(-) create mode 100644 include/grub/pciutils.h diff --git a/commands/lspci.c b/commands/lspci.c index 10618c7a9..bcaafa4f8 100644 --- a/commands/lspci.c +++ b/commands/lspci.c @@ -143,8 +143,6 @@ grub_lspci_iter (grub_pci_device_t dev, grub_pci_id_t pciid) grub_printf ("\n"); - grub_pci_close (dev); - return 0; } @@ -159,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/configure.ac b/configure.ac index 5a98e3433..ceb81881a 100644 --- a/configure.ac +++ b/configure.ac @@ -531,9 +531,14 @@ else enable_grub_emu=no grub_emu_usb_excuse="grub-emu isn't built" fi +if test x"$enable_grub_emu_pci" = xyes ; then + grub_emu_usb_excuse="conflicts with PCI support" +fi + if test x"$enable_grub_emu_usb" = xno ; then grub_emu_usb_excuse="explicitly disabled" fi + [if [ x"$grub_emu_usb_excuse" = x ]; then # Check for libusb libraries.] AC_CHECK_LIB([usb], [usb_claim_interface], [LIBUSB="-lusb"], @@ -555,7 +560,29 @@ enable_grub_emu_usb=no fi if test x"$enable_grub_emu_pci" != xyes ; then - enable_grub_emu_pci = no + 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([pci], [pci_alloc], [LIBPCI="-lpci"], + [grub_emu_pci_excuse=["need libpci library"]]) + AC_SUBST([LIBPCI]) +[fi] +[if [ x"$grub_emu_pci_excuse" = x ]; then + # Check for headers.] + AC_CHECK_HEADERS([pci/pci.h], [], + [grub_emu_pci_excuse=["need libpci 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]) @@ -634,6 +661,12 @@ 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 + if [ x"$enable_mm_debug" = xyes ]; then echo With memory debugging: Yes else diff --git a/include/grub/i386/pci.h b/include/grub/i386/pci.h index c8de9ff32..996f64245 100644 --- a/include/grub/i386/pci.h +++ b/include/grub/i386/pci.h @@ -67,9 +67,4 @@ 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_close (grub_pci_device_t dev __attribute__ ((unused))) -{ -} - #endif /* GRUB_CPU_PCI_H */ diff --git a/include/grub/pciutils.h b/include/grub/pciutils.h new file mode 100644 index 000000000..5ce612fee --- /dev/null +++ b/include/grub/pciutils.h @@ -0,0 +1,88 @@ +/* + * 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_dev *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) +{ + return pci_read_long (addr.dev, addr.pos); +} + +static inline grub_uint16_t +grub_pci_read_word (grub_pci_address_t addr) +{ + return pci_read_word (addr.dev, addr.pos); +} + +static inline grub_uint8_t +grub_pci_read_byte (grub_pci_address_t addr) +{ + return pci_read_byte (addr.dev, addr.pos); +} + +static inline void +grub_pci_write (grub_pci_address_t addr, grub_uint32_t data) +{ + pci_write_long (addr.dev, addr.pos, data); +} + +static inline void +grub_pci_write_word (grub_pci_address_t addr, grub_uint16_t data) +{ + pci_write_word (addr.dev, addr.pos, data); +} + +static inline void +grub_pci_write_byte (grub_pci_address_t addr, grub_uint8_t data) +{ + pci_write_byte (addr.dev, addr.pos, data); +} + +#endif /* GRUB_PCIUTILS_H */ diff --git a/util/pci.c b/util/pci.c index 99962c31d..e17068149 100644 --- a/util/pci.c +++ b/util/pci.c @@ -31,12 +31,6 @@ grub_pci_make_address (grub_pci_device_t dev, int reg) return ret; } -void -grub_pci_close (grub_pci_device_t dev) -{ - pci_free_dev (dev); -} - void grub_pci_iterate (grub_pci_iteratefunc_t hook) { @@ -49,6 +43,7 @@ GRUB_MOD_INIT (pci) { acc = pci_alloc (); pci_init (acc); + pci_scan_bus (acc); } GRUB_MOD_FINI (pci) From 459fed4b98162b84b93b4e9b77ab2895bae29bf1 Mon Sep 17 00:00:00 2001 From: phcoder Date: Wed, 14 Oct 2009 18:17:18 +0200 Subject: [PATCH 03/48] pciaccess --- Makefile.in | 2 +- conf/i386-pc.rmk | 2 +- configure.ac | 8 ++++---- include/grub/i386/pci.h | 16 ++++++++++++++++ include/grub/pciutils.h | 31 ++++++++++++++++++++++-------- util/pci.c | 42 ++++++++++++++++++++++++++++++++--------- 6 files changed, 78 insertions(+), 23 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4e45dc569..1733f1c01 100644 --- a/Makefile.in +++ b/Makefile.in @@ -100,7 +100,7 @@ endif AWK = @AWK@ LIBCURSES = @LIBCURSES@ LIBUSB = @LIBUSB@ -LIBPCI = @LIBPCI@ +LIBPCIACCESS = @LIBPCIACCESS@ YACC = @YACC@ UNIFONT_BDF = @UNIFONT_BDF@ diff --git a/conf/i386-pc.rmk b/conf/i386-pc.rmk index 107ae7a22..e4b89a8b9 100644 --- a/conf/i386-pc.rmk +++ b/conf/i386-pc.rmk @@ -170,7 +170,7 @@ endif ifeq ($(enable_grub_emu_pci), yes) grub_emu_SOURCES += util/pci.c commands/lspci.c -grub_emu_LDFLAGS += $(LIBPCI) +grub_emu_LDFLAGS += $(LIBPCIACCESS) endif # Scripts. diff --git a/configure.ac b/configure.ac index ceb81881a..5473ac3a3 100644 --- a/configure.ac +++ b/configure.ac @@ -569,14 +569,14 @@ fi [if [ x"$grub_emu_pci_excuse" = x ]; then # Check for libpci libraries.] - AC_CHECK_LIB([pci], [pci_alloc], [LIBPCI="-lpci"], - [grub_emu_pci_excuse=["need libpci library"]]) - AC_SUBST([LIBPCI]) + 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 libpci headers"]]) + [grub_emu_pci_excuse=["need libpciaccess headers"]]) [fi] if test x"$grub_emu_pci_excuse" = x ; then 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/pciutils.h b/include/grub/pciutils.h index 5ce612fee..36d47e5c8 100644 --- a/include/grub/pciutils.h +++ b/include/grub/pciutils.h @@ -19,9 +19,9 @@ #ifndef GRUB_PCIUTILS_H #define GRUB_PCIUTILS_H 1 -#include +#include -typedef struct pci_dev *grub_pci_device_t; +typedef struct pci_device *grub_pci_device_t; static inline int grub_pci_get_bus (grub_pci_device_t dev) @@ -52,37 +52,52 @@ typedef struct grub_pci_address grub_pci_address_t; static inline grub_uint32_t grub_pci_read (grub_pci_address_t addr) { - return pci_read_long (addr.dev, addr.pos); + 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) { - return pci_read_word (addr.dev, addr.pos); + 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) { - return pci_read_byte (addr.dev, addr.pos); + 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_write_long (addr.dev, addr.pos, 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_write_word (addr.dev, addr.pos, 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_write_byte (addr.dev, addr.pos, 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/util/pci.c b/util/pci.c index e17068149..8915068aa 100644 --- a/util/pci.c +++ b/util/pci.c @@ -19,8 +19,7 @@ #include #include - -struct pci_access *acc = 0; +#include grub_pci_address_t grub_pci_make_address (grub_pci_device_t dev, int reg) @@ -34,19 +33,44 @@ grub_pci_make_address (grub_pci_device_t dev, int reg) void grub_pci_iterate (grub_pci_iteratefunc_t hook) { - grub_pci_device_t cur; - for (cur = acc->devices; cur; cur = cur->next) - hook (cur, cur->vendor_id|(cur->device_id << 16)); + 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) { - acc = pci_alloc (); - pci_init (acc); - pci_scan_bus (acc); + pci_system_init (); } GRUB_MOD_FINI (pci) { - pci_cleanup (acc); + pci_system_cleanup (); } From f022876b03419bf8e725efa6c3e80d527b8dcf5c Mon Sep 17 00:00:00 2001 From: Felix Zielcke Date: Wed, 25 Nov 2009 18:37:04 +0100 Subject: [PATCH 04/48] 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. --- ChangeLog | 9 +++++++++ INSTALL | 2 +- configure.ac | 2 +- util/grub.d/10_kfreebsd.in | 2 +- util/grub.d/10_linux.in | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2e8ad37b..2b5b05425 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +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 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/configure.ac b/configure.ac index 0a76c7b51..08667d976 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]) diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in index c6712e32f..417fc93e3 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" ;; diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index 8803055cf..36a9fd9ea 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 From 6f61ed5513b13c021f4fd5fcebf51d71b685d391 Mon Sep 17 00:00:00 2001 From: Felix Zielcke Date: Wed, 25 Nov 2009 19:13:35 +0100 Subject: [PATCH 05/48] 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. --- ChangeLog | 6 ++++++ util/grub.d/10_kfreebsd.in | 2 +- util/grub.d/10_linux.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b5b05425..90721746b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +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). diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in index 417fc93e3..1329bba1f 100644 --- a/util/grub.d/10_kfreebsd.in +++ b/util/grub.d/10_kfreebsd.in @@ -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 36a9fd9ea..5fea5338e 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -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 From 8a4c07fd6a5ee22a5a4053cff3d6d1a9772f6cc1 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Wed, 25 Nov 2009 23:10:02 +0000 Subject: [PATCH 06/48] 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'. --- ChangeLog | 34 +++ conf/common.rmk | 21 +- conf/i386-coreboot.rmk | 3 - conf/i386-efi.rmk | 3 - conf/i386-ieee1275.rmk | 3 - conf/i386-pc.rmk | 6 +- conf/powerpc-ieee1275.rmk | 3 - conf/sparc64-ieee1275.rmk | 4 +- conf/x86_64-efi.rmk | 3 - po/ca.po | 30 +- po/id.po | 363 +++++++++++++++++++++--- po/zh_CN.po | 275 ++++++++++++++++-- util/elf/grub-mkimage.c | 16 +- util/grub-editenv.c | 10 +- util/grub-emu.c | 18 +- util/grub-fstest.c | 20 +- util/grub-mkdevicemap.c | 18 +- util/grub-mkfont.c | 16 +- util/grub-mkrelpath.c | 16 +- util/grub-pe2elf.c | 12 +- util/grub-probe.c | 16 +- util/misc.c | 9 +- util/sparc64/ieee1275/grub-mkimage.c | 12 +- util/sparc64/ieee1275/grub-ofpathname.c | 7 +- util/sparc64/ieee1275/grub-setup.c | 11 +- 25 files changed, 750 insertions(+), 179 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90721746b..a4798baa0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,37 @@ +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 diff --git a/conf/common.rmk b/conf/common.rmk index 216098b51..896705526 100644 --- a/conf/common.rmk +++ b/conf/common.rmk @@ -1,15 +1,21 @@ # -*- makefile -*- +sbin_UTILITIES += grub-mkdevicemap +grub_mkdevicemap_SOURCES = gnulib/progname.c util/grub-mkdevicemap.c \ + util/deviceiter.c \ + util/devicemap.c util/misc.c + # 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 +50,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 +73,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 +128,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 +136,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..7e92dd6c9 100644 --- a/conf/i386-coreboot.rmk +++ b/conf/i386-coreboot.rmk @@ -94,10 +94,7 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke /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 diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk index 80c2978da..8fca829d2 100644 --- a/conf/i386-efi.rmk +++ b/conf/i386-efi.rmk @@ -9,7 +9,6 @@ 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 \ @@ -24,8 +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. diff --git a/conf/i386-ieee1275.rmk b/conf/i386-ieee1275.rmk index 564893666..ce33277d9 100644 --- a/conf/i386-ieee1275.rmk +++ b/conf/i386-ieee1275.rmk @@ -48,10 +48,7 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke /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. 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..a0d97de65 100644 --- a/conf/powerpc-ieee1275.rmk +++ b/conf/powerpc-ieee1275.rmk @@ -29,10 +29,7 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke 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 \ diff --git a/conf/sparc64-ieee1275.rmk b/conf/sparc64-ieee1275.rmk index 900b70e3c..6836ee6a9 100644 --- a/conf/sparc64-ieee1275.rmk +++ b/conf/sparc64-ieee1275.rmk @@ -59,7 +59,7 @@ 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 \ @@ -85,8 +85,6 @@ grub_setup_SOURCES = util/sparc64/ieee1275/grub-setup.c util/hostdisk.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/ieee1275/ofpath.c util/ieee1275/devicemap.c util/misc.c # For grub-ofpathname. diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk index 3b7ac34fa..b5d129f47 100644 --- a/conf/x86_64-efi.rmk +++ b/conf/x86_64-efi.rmk @@ -9,7 +9,6 @@ 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 \ @@ -23,8 +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. diff --git a/po/ca.po b/po/ca.po index 58783edbd..29b9c9557 100644 --- a/po/ca.po +++ b/po/ca.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: GNU GRUB\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-11-22 11:45+0000\n" +"POT-Creation-Date: 2009-11-25 23:57+0100\n" "PO-Revision-Date: 2009-11-17 12:26+0100\n" "Last-Translator: Robert Millan \n" "Language-Team: None \n" @@ -40,7 +40,7 @@ msgstr "" msgid "Core image is too big (%p > %p)\n" msgstr "" -#: util/i386/pc/grub-mkimage.c:321 util/i386/pc/grub-setup.c:587 +#: 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" @@ -162,39 +162,39 @@ msgstr "" msgid "If you really want blocklists, use --force." msgstr "" -#: util/i386/pc/grub-setup.c:439 +#: 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:440 +#: 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:498 +#: util/i386/pc/grub-setup.c:500 #, c-format msgid "Cannot read `%s' correctly" msgstr "" -#: util/i386/pc/grub-setup.c:511 +#: util/i386/pc/grub-setup.c:513 msgid "No terminator in the core image" msgstr "" -#: util/i386/pc/grub-setup.c:522 +#: 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:528 +#: 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:547 +#: util/i386/pc/grub-setup.c:549 #, c-format msgid "Cannot open `%s'" msgstr "" -#: util/i386/pc/grub-setup.c:589 +#: util/i386/pc/grub-setup.c:591 #, c-format msgid "" "Usage: grub-setup [OPTION]... DEVICE\n" @@ -216,27 +216,27 @@ msgid "" "Report bugs to <%s>.\n" msgstr "" -#: util/i386/pc/grub-setup.c:719 +#: util/i386/pc/grub-setup.c:721 #, c-format msgid "No device is specified.\n" msgstr "" -#: util/i386/pc/grub-setup.c:725 +#: util/i386/pc/grub-setup.c:727 #, c-format msgid "Unknown extra argument `%s'.\n" msgstr "" -#: util/i386/pc/grub-setup.c:742 +#: util/i386/pc/grub-setup.c:744 #, c-format msgid "Invalid device `%s'.\n" msgstr "" -#: util/i386/pc/grub-setup.c:755 +#: util/i386/pc/grub-setup.c:757 #, c-format msgid "Invalid root device `%s'" msgstr "" -#: util/i386/pc/grub-setup.c:768 +#: util/i386/pc/grub-setup.c:770 msgid "Cannot guess the root device. Specify the option ``--root-device''." msgstr "" diff --git a/po/id.po b/po/id.po index d97cfb9e7..f38babc28 100644 --- a/po/id.po +++ b/po/id.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: grub 1.97+20091122\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-11-22 11:48+0100\n" +"POT-Creation-Date: 2009-11-25 23:57+0100\n" "PO-Revision-Date: 2009-11-22 20:00+0700\n" "Last-Translator: Arif E. Nugroho \n" "Language-Team: Indonesian \n" @@ -41,7 +41,7 @@ msgstr "besar diskboot.img seharusnya %u bytes" 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:587 +#: 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" @@ -72,7 +72,8 @@ msgstr "" " -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" +" -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" @@ -114,86 +115,122 @@ 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" +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)" +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." +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." +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!" +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!" +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." +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." +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." +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:439 +#: 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:440 +#: 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:498 +#: 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:511 +#: 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:522 +#: 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:528 +#: 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:547 +#: util/i386/pc/grub-setup.c:549 #, c-format msgid "Cannot open `%s'" msgstr "Tidak dapat membuka `%s'" -#: util/i386/pc/grub-setup.c:589 +#: util/i386/pc/grub-setup.c:591 #, c-format msgid "" "Usage: grub-setup [OPTION]... DEVICE\n" @@ -225,36 +262,38 @@ msgstr "" " -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" +" -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:719 +#: 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:725 +#: 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:742 +#: 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:755 +#: 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:768 +#: 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''." +msgstr "" +"Tidak dapat menebak perangkat root. Spesifikasikan pilihan ``--root-device''." #: util/mkisofs/eltorito.c:96 #, c-format @@ -269,7 +308,9 @@ 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" +msgstr "" +"Berkas ini mungkin telah terhapus sebelum sebuah CD bootable dapat " +"dilakukan.\n" #: util/mkisofs/eltorito.c:110 #, c-format @@ -360,7 +401,9 @@ 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" +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 @@ -392,6 +435,208 @@ msgstr "Fatal goof - tidak dapat menemukan lokasi direktori\n" 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" @@ -509,12 +754,16 @@ 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" +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" +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 @@ -574,8 +823,13 @@ 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" +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 @@ -593,12 +847,15 @@ 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" +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" +msgstr "" +"Tidak dapat memasukan berkas terkompress secara transparan - konflik nama\n" #: util/mkisofs/rock.c:591 msgid "Extension record too long\n" @@ -674,7 +931,8 @@ 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" +msgstr "" +"Tidak dapat memperoleh statistik berkas %s - mengabaikan dan melanjutkan.\n" #: util/mkisofs/tree.c:1003 #, c-format @@ -791,8 +1049,11 @@ 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" +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 @@ -819,6 +1080,13 @@ msgstr "Total bytes direktori: %d\n" 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" @@ -858,7 +1126,8 @@ msgstr "%s, dengan Linux %s" #~ 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)" +#~ 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" diff --git a/po/zh_CN.po b/po/zh_CN.po index 9816afbad..5f86d9c4b 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -8,10 +8,11 @@ msgid "" msgstr "" "Project-Id-Version: grub 1.97+20091122\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-11-22 11:48+0100\n" +"POT-Creation-Date: 2009-11-25 23:57+0100\n" "PO-Revision-Date: 2009-11-23 18:36+0800\n" "Last-Translator: Aron Xu \n" -"Language-Team: Chinese (simplified) \n" +"Language-Team: Chinese (simplified) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -42,7 +43,7 @@ msgstr "diskboot.img 的大小必须为 %u 字节" msgid "Core image is too big (%p > %p)\n" msgstr "核心映像太大(%p > %p)\n" -#: util/i386/pc/grub-mkimage.c:321 util/i386/pc/grub-setup.c:587 +#: 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" @@ -105,7 +106,11 @@ 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)" +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 @@ -113,19 +118,26 @@ 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." +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." +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!" +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!" +msgid "" +"This GPT partition label has no BIOS Boot Partition; embedding won't be " +"possible!" msgstr "" #: util/i386/pc/grub-setup.c:374 @@ -137,50 +149,55 @@ 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." +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." +msgid "" +"Embedding is not possible. GRUB can only be installed in this setup by " +"using blocklists. However, blocklists are UNRELIABLE and its use is " +"discouraged." msgstr "" #: util/i386/pc/grub-setup.c:425 msgid "If you really want blocklists, use --force." msgstr "" -#: util/i386/pc/grub-setup.c:439 +#: 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:440 +#: 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:498 +#: util/i386/pc/grub-setup.c:500 #, c-format msgid "Cannot read `%s' correctly" msgstr "无法正确读取 `%s'" -#: util/i386/pc/grub-setup.c:511 +#: util/i386/pc/grub-setup.c:513 msgid "No terminator in the core image" msgstr "核心映像中没有终止符" -#: util/i386/pc/grub-setup.c:522 +#: 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:528 +#: 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:547 +#: util/i386/pc/grub-setup.c:549 #, c-format msgid "Cannot open `%s'" msgstr "无法打开 `%s'" -#: util/i386/pc/grub-setup.c:589 +#: util/i386/pc/grub-setup.c:591 #, c-format msgid "" "Usage: grub-setup [OPTION]... DEVICE\n" @@ -202,27 +219,27 @@ msgid "" "Report bugs to <%s>.\n" msgstr "" -#: util/i386/pc/grub-setup.c:719 +#: util/i386/pc/grub-setup.c:721 #, c-format msgid "No device is specified.\n" msgstr "没有指定设备。\n" -#: util/i386/pc/grub-setup.c:725 +#: util/i386/pc/grub-setup.c:727 #, c-format msgid "Unknown extra argument `%s'.\n" msgstr "未知的额外参数 `%s'。\n" -#: util/i386/pc/grub-setup.c:742 +#: util/i386/pc/grub-setup.c:744 #, c-format msgid "Invalid device `%s'.\n" msgstr "无效的设备 `%s'。\n" -#: util/i386/pc/grub-setup.c:755 +#: util/i386/pc/grub-setup.c:757 #, c-format msgid "Invalid root device `%s'" msgstr "无效的根设备 `%s'" -#: util/i386/pc/grub-setup.c:768 +#: util/i386/pc/grub-setup.c:770 msgid "Cannot guess the root device. Specify the option ``--root-device''." msgstr "无法猜测根设备。请使用 ``--root-device'' 选项指定。" @@ -362,6 +379,201 @@ msgstr "" 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" @@ -483,7 +695,8 @@ msgstr "" #: util/mkisofs/mkisofs.c:984 #, c-format -msgid "Warning: -C specified without -M: old session data will not be merged.\n" +msgid "" +"Warning: -C specified without -M: old session data will not be merged.\n" msgstr "" #: util/mkisofs/mkisofs.c:1023 @@ -544,7 +757,9 @@ 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" +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 @@ -761,7 +976,8 @@ msgstr "" #: util/mkisofs/write.c:1154 #, c-format -msgid "Number of extents written different than what was predicted. Please fix.\n" +msgid "" +"Number of extents written different than what was predicted. Please fix.\n" msgstr "" #: util/mkisofs/write.c:1155 @@ -789,6 +1005,13 @@ msgstr "" 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 "" 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/grub-editenv.c b/util/grub-editenv.c index 5b688d9cb..842c5a103 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 @@ -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..03184b632 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) { @@ -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-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..40d145fd3 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); } @@ -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-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..b88fbaaae 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, @@ -303,10 +306,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 +322,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 +334,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 +382,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/misc.c b/util/misc.c index 765adf58b..626851306 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); diff --git a/util/sparc64/ieee1275/grub-mkimage.c b/util/sparc64/ieee1275/grub-mkimage.c index 0a611da8f..5260996f6 100644 --- a/util/sparc64/ieee1275/grub-mkimage.c +++ b/util/sparc64/ieee1275/grub-mkimage.c @@ -188,10 +188,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 +204,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 +218,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..4b852698f 100644 --- a/util/sparc64/ieee1275/grub-ofpathname.c +++ b/util/sparc64/ieee1275/grub-ofpathname.c @@ -24,11 +24,14 @@ 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..6ce8cdf6d 100644 --- a/util/sparc64/ieee1275/grub-setup.c +++ b/util/sparc64/ieee1275/grub-setup.c @@ -401,10 +401,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 +419,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 +616,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)) From a755bb0437e5548b5c730151d4faae6a7bc9cb2b Mon Sep 17 00:00:00 2001 From: Felix Zielcke Date: Thu, 26 Nov 2009 00:52:55 +0100 Subject: [PATCH 07/48] 2009-11-26 Felix Zielcke * conf/any-emu.rmk (grub_mkfont_SOURCES): Add `gnulib/progname.c'. --- ChangeLog | 4 ++++ conf/any-emu.rmk | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a4798baa0..5fec92462 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +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'. diff --git a/conf/any-emu.rmk b/conf/any-emu.rmk index 268d9743e..fa2c63596 100644 --- a/conf/any-emu.rmk +++ b/conf/any-emu.rmk @@ -79,7 +79,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 From db77c4d43c4abfa40ea46b14e889c30d6c54705b Mon Sep 17 00:00:00 2001 From: Felix Zielcke Date: Thu, 26 Nov 2009 01:08:42 +0100 Subject: [PATCH 08/48] 2009-11-26 Felix Zielcke * conf/any-emu.rmk (grub_emu_SOURCES): Add `gnulib/progname.c'. --- ChangeLog | 4 ++++ conf/any-emu.rmk | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fec92462..f89498f83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +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'. diff --git a/conf/any-emu.rmk b/conf/any-emu.rmk index fa2c63596..6c6f3657f 100644 --- a/conf/any-emu.rmk +++ b/conf/any-emu.rmk @@ -14,7 +14,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 \ @@ -28,7 +28,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 \ @@ -37,7 +37,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 \ @@ -45,7 +45,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 From 7656de4f5bafec4570b8ab953ebe8687ba8484e8 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Thu, 26 Nov 2009 00:45:53 +0000 Subject: [PATCH 09/48] 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. --- ChangeLog | 10 ++++++++++ conf/i386-coreboot.rmk | 4 ---- conf/i386-efi.rmk | 2 -- conf/i386-ieee1275.rmk | 4 ---- conf/powerpc-ieee1275.rmk | 4 ---- conf/sparc64-ieee1275.rmk | 2 -- conf/x86_64-efi.rmk | 2 -- 7 files changed, 10 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index f89498f83..037297b9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +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'. diff --git a/conf/i386-coreboot.rmk b/conf/i386-coreboot.rmk index 7e92dd6c9..ccc326f5c 100644 --- a/conf/i386-coreboot.rmk +++ b/conf/i386-coreboot.rmk @@ -93,10 +93,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. - - util/devicemap.c util/misc.c - sbin_SCRIPTS += grub-install grub_install_SOURCES = util/grub-install.in diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk index 8fca829d2..ebb908fc9 100644 --- a/conf/i386-efi.rmk +++ b/conf/i386-efi.rmk @@ -23,8 +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 - util/devicemap.c util/misc.c - # Scripts. sbin_SCRIPTS = grub-install diff --git a/conf/i386-ieee1275.rmk b/conf/i386-ieee1275.rmk index ce33277d9..8d9577844 100644 --- a/conf/i386-ieee1275.rmk +++ b/conf/i386-ieee1275.rmk @@ -47,10 +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. - - util/devicemap.c util/misc.c - # Scripts. sbin_SCRIPTS = grub-install diff --git a/conf/powerpc-ieee1275.rmk b/conf/powerpc-ieee1275.rmk index a0d97de65..85b1fa211 100644 --- a/conf/powerpc-ieee1275.rmk +++ b/conf/powerpc-ieee1275.rmk @@ -28,10 +28,6 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke # Programs pkglib_PROGRAMS = kernel.img -# Utilities. - - 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 6836ee6a9..8c8bf27e6 100644 --- a/conf/sparc64-ieee1275.rmk +++ b/conf/sparc64-ieee1275.rmk @@ -85,8 +85,6 @@ grub_setup_SOURCES = util/sparc64/ieee1275/grub-setup.c util/hostdisk.c \ util/raid.c util/lvm.c \ grub_setup_init.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 diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk index b5d129f47..2e1b4e76e 100644 --- a/conf/x86_64-efi.rmk +++ b/conf/x86_64-efi.rmk @@ -22,8 +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 - util/devicemap.c util/misc.c - # Scripts. sbin_SCRIPTS = grub-install From e30dd3929642db8359a58f9c45cc908101b97f1c Mon Sep 17 00:00:00 2001 From: Felix Zielcke Date: Thu, 26 Nov 2009 16:29:06 +0100 Subject: [PATCH 10/48] 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. --- ChangeLog | 5 +++++ conf/i386-efi.rmk | 4 ++-- conf/x86_64-efi.rmk | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 037297b9e..cae094af9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk index ebb908fc9..6582ab11b 100644 --- a/conf/i386-efi.rmk +++ b/conf/i386-efi.rmk @@ -11,8 +11,8 @@ script/lexer.c_DEPENDENCIES = grub_script.tab.h bin_UTILITIES = grub-mkimage # For grub-mkimage. -grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \ - util/resolve.c +grub_mkimage_SOURCES = gnulib/progname.c util/i386/efi/grub-mkimage.c \ + util/misc.c util/resolve.c util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile # For grub-setup. diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk index 2e1b4e76e..343b333ee 100644 --- a/conf/x86_64-efi.rmk +++ b/conf/x86_64-efi.rmk @@ -11,8 +11,8 @@ script/lexer.c_DEPENDENCIES = grub_script.tab.h bin_UTILITIES = grub-mkimage # For grub-mkimage. -grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \ - util/resolve.c +grub_mkimage_SOURCES = gnulib/progname.c util/i386/efi/grub-mkimage.c \ + util/misc.c util/resolve.c # For grub-setup. #grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \ From 242668a26a38ce808cb2f952d45c7b0665755fc9 Mon Sep 17 00:00:00 2001 From: Felix Zielcke Date: Thu, 26 Nov 2009 17:15:16 +0100 Subject: [PATCH 11/48] 2009-11-26 Felix Zielcke * util/i386/efi/grub-mkimage.c: Include "progname.h". (main): Use `program_name' instead of nonexistent `progname'. --- ChangeLog | 5 +++++ util/i386/efi/grub-mkimage.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cae094af9..4c6589a5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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'. diff --git a/util/i386/efi/grub-mkimage.c b/util/i386/efi/grub-mkimage.c index 29a823e58..401c5006c 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) @@ -1056,7 +1057,7 @@ main (int argc, char *argv[]) char *dir = NULL; char *prefix = NULL; - progname = "grub-mkimage"; + program_name = "grub-mkimage"; while (1) { From dc63338117bb069e0921e438fb8e8e41f994b91f Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 27 Nov 2009 16:33:22 +0100 Subject: [PATCH 12/48] Rename efi_fb to efi_uga --- conf/i386-efi.rmk | 8 ++++---- conf/x86_64-efi.rmk | 8 ++++---- video/{efi_fb.c => efi_uga.c} | 0 3 files changed, 8 insertions(+), 8 deletions(-) rename video/{efi_fb.c => efi_uga.c} (100%) diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk index ebb908fc9..93ea47864 100644 --- a/conf/i386-efi.rmk +++ b/conf/i386-efi.rmk @@ -143,10 +143,10 @@ 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 += xnu.mod xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c\ diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk index 2e1b4e76e..2ae91dbf4 100644 --- a/conf/x86_64-efi.rmk +++ b/conf/x86_64-efi.rmk @@ -149,10 +149,10 @@ 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 += xnu.mod xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/efi/xnu.c\ diff --git a/video/efi_fb.c b/video/efi_uga.c similarity index 100% rename from video/efi_fb.c rename to video/efi_uga.c From 9ed4841d7a792cc22a180d7cec2c92df904091e6 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Fri, 27 Nov 2009 16:46:00 +0000 Subject: [PATCH 13/48] 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. --- ChangeLog | 7 +++++++ Makefile.in | 4 ++-- po/ChangeLog | 4 ++++ po/LINGUAS | 3 --- 4 files changed, 13 insertions(+), 5 deletions(-) delete mode 100644 po/LINGUAS diff --git a/ChangeLog b/ChangeLog index 4c6589a5d..a21569730 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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". diff --git a/Makefile.in b/Makefile.in index 7678ceee0..43d220663 100644 --- a/Makefile.in +++ b/Makefile.in @@ -45,7 +45,7 @@ XGETTEXT = @XGETTEXT@ MSGMERGE = @MSGMERGE@ MSGFMT = @MSGFMT@ -LINGUAS = $(shell tr '\n' ' ' < $(srcdir)/po/LINGUAS) +LINGUAS = $(shell ls $(srcdir)/po/*.po | sed -e "s,.*/po/\(.*\)\.po$$,\1,") PACKAGE = @PACKAGE@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -478,7 +478,7 @@ $(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f $< --keyword=_ --keyword=N_ cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f po/POTFILES-shell -j --language=Shell -$(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): po/$(PACKAGE).pot +po/%.po: po/$(PACKAGE).pot $(MSGMERGE) -U $@ $^ po/%.mo: po/%.po diff --git a/po/ChangeLog b/po/ChangeLog index 6e537ccbf..4069fb315 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,7 @@ +2009-11-27 Robert Millan + + * LINGUAS: Remove. + 2009-11-24 Robert Millan * zh_CN.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 From 3bc7896c1a673401166933b9cd759e6b2f669cae Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Fri, 27 Nov 2009 17:11:38 +0000 Subject: [PATCH 14/48] 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. --- ChangeLog | 22 + Makefile.in | 4 +- po/ChangeLog | 47 --- po/ca.po | 1018 -------------------------------------------- po/id.po | 1149 -------------------------------------------------- po/zh_CN.po | 1055 --------------------------------------------- 6 files changed, 25 insertions(+), 3270 deletions(-) delete mode 100644 po/ChangeLog delete mode 100644 po/ca.po delete mode 100644 po/id.po delete mode 100644 po/zh_CN.po diff --git a/ChangeLog b/ChangeLog index a21569730..1be96874f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +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 @@ -188,6 +198,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. @@ -390,6 +402,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'. @@ -408,6 +422,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. @@ -435,6 +451,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. @@ -445,6 +463,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. @@ -456,6 +475,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 @@ -495,6 +515,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/Makefile.in b/Makefile.in index 43d220663..aa8f932c9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -45,7 +45,9 @@ XGETTEXT = @XGETTEXT@ MSGMERGE = @MSGMERGE@ MSGFMT = @MSGFMT@ -LINGUAS = $(shell ls $(srcdir)/po/*.po | sed -e "s,.*/po/\(.*\)\.po$$,\1,") +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@ diff --git a/po/ChangeLog b/po/ChangeLog deleted file mode 100644 index 4069fb315..000000000 --- a/po/ChangeLog +++ /dev/null @@ -1,47 +0,0 @@ -2009-11-27 Robert Millan - - * LINGUAS: Remove. - -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/ca.po b/po/ca.po deleted file mode 100644 index 29b9c9557..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:57+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 f38babc28..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:57+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 5f86d9c4b..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:57+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'" From fb6c1a7b254377f7e74dab85bcba6b54aa35dc9e Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Fri, 27 Nov 2009 17:33:35 +0000 Subject: [PATCH 15/48] 2009-11-27 Robert Millan * po/README: New file. Explain our PO file workflow. --- ChangeLog | 4 ++++ po/README | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 po/README diff --git a/ChangeLog b/ChangeLog index 1be96874f..3f77a5d85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +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 ... 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! From b1309dae1a2128dafad65e994ae48ee3388b72a7 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 27 Nov 2009 23:48:20 +0100 Subject: [PATCH 16/48] finish renaiming efi_Fb to efi_uga --- video/efi_uga.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/video/efi_uga.c b/video/efi_uga.c index 2faff12f9..b5f3e62f2 100644 --- a/video/efi_uga.c +++ b/video/efi_uga.c @@ -183,20 +183,20 @@ check_protocol (void) } static grub_err_t -grub_video_efi_init (void) +grub_video_uga_init (void) { grub_memset (&framebuffer, 0, sizeof(framebuffer)); return grub_video_fb_init (); } static grub_err_t -grub_video_efi_fini (void) +grub_video_uga_fini (void) { return grub_video_fb_fini (); } static grub_err_t -grub_video_efi_setup (unsigned int width, unsigned int height, +grub_video_uga_setup (unsigned int width, unsigned int height, unsigned int mode_type) { unsigned int depth; @@ -269,14 +269,14 @@ grub_video_efi_setup (unsigned int width, unsigned int height, } static grub_err_t -grub_video_efi_swap_buffers (void) +grub_video_uga_swap_buffers (void) { /* TODO: Implement buffer swapping. */ return GRUB_ERR_NONE; } static grub_err_t -grub_video_efi_set_active_render_target (struct grub_video_render_target *target) +grub_video_uga_set_active_render_target (struct grub_video_render_target *target) { if (target == GRUB_VIDEO_RENDER_TARGET_DISPLAY) target = framebuffer.render_target; @@ -285,7 +285,7 @@ grub_video_efi_set_active_render_target (struct grub_video_render_target *target } static grub_err_t -grub_video_efi_get_info_and_fini (struct grub_video_mode_info *mode_info, +grub_video_uga_get_info_and_fini (struct grub_video_mode_info *mode_info, void **framebuf) { grub_memcpy (mode_info, &(framebuffer.mode_info), sizeof (*mode_info)); @@ -296,15 +296,15 @@ grub_video_efi_get_info_and_fini (struct grub_video_mode_info *mode_info, return GRUB_ERR_NONE; } -static struct grub_video_adapter grub_video_efi_adapter = +static struct grub_video_adapter grub_video_uga_adapter = { - .name = "EFI frame buffer driver", + .name = "EFI UGA driver", - .init = grub_video_efi_init, - .fini = grub_video_efi_fini, - .setup = grub_video_efi_setup, + .init = grub_video_uga_init, + .fini = grub_video_uga_fini, + .setup = grub_video_uga_setup, .get_info = grub_video_fb_get_info, - .get_info_and_fini = grub_video_efi_get_info_and_fini, + .get_info_and_fini = grub_video_uga_get_info_and_fini, .set_palette = grub_video_fb_set_palette, .get_palette = grub_video_fb_get_palette, .set_viewport = grub_video_fb_set_viewport, @@ -317,21 +317,21 @@ static struct grub_video_adapter grub_video_efi_adapter = .blit_bitmap = grub_video_fb_blit_bitmap, .blit_render_target = grub_video_fb_blit_render_target, .scroll = grub_video_fb_scroll, - .swap_buffers = grub_video_efi_swap_buffers, + .swap_buffers = grub_video_uga_swap_buffers, .create_render_target = grub_video_fb_create_render_target, .delete_render_target = grub_video_fb_delete_render_target, - .set_active_render_target = grub_video_efi_set_active_render_target, + .set_active_render_target = grub_video_uga_set_active_render_target, .get_active_render_target = grub_video_fb_get_active_render_target, }; GRUB_MOD_INIT(efi_fb) { if (check_protocol ()) - grub_video_register (&grub_video_efi_adapter); + grub_video_register (&grub_video_uga_adapter); } GRUB_MOD_FINI(efi_fb) { if (uga) - grub_video_unregister (&grub_video_efi_adapter); + grub_video_unregister (&grub_video_uga_adapter); } From 1708050b6f1305104cf1df8fec38fbb4d1b26f98 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko <> Date: Sat, 28 Nov 2009 00:15:04 +0100 Subject: [PATCH 17/48] GOP support Also-By: Bean Lee <> --- conf/i386-efi.rmk | 5 + conf/x86_64-efi.rmk | 5 + include/grub/efi/graphics_output.h | 96 +++++++ video/efi_gop.c | 398 +++++++++++++++++++++++++++++ 4 files changed, 504 insertions(+) create mode 100644 include/grub/efi/graphics_output.h create mode 100644 video/efi_gop.c diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk index 93ea47864..c16ab1f98 100644 --- a/conf/i386-efi.rmk +++ b/conf/i386-efi.rmk @@ -148,6 +148,11 @@ 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\ loader/macho.c loader/xnu.c loader/i386/xnu_helper.S diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk index 2ae91dbf4..94db5727d 100644 --- a/conf/x86_64-efi.rmk +++ b/conf/x86_64-efi.rmk @@ -154,6 +154,11 @@ 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\ loader/macho.c loader/xnu.c loader/i386/xnu_helper.S diff --git a/include/grub/efi/graphics_output.h b/include/grub/efi/graphics_output.h new file mode 100644 index 000000000..9127a16d1 --- /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/video/efi_gop.c b/video/efi_gop.c new file mode 100644 index 000000000..0123ee274 --- /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 *) 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_fb) +{ + if (check_protocol ()) + grub_video_register (&grub_video_gop_adapter); +} + +GRUB_MOD_FINI(efi_fb) +{ + if (restore_needed) + { + efi_call_2 (gop->set_mode, gop, old_mode); + restore_needed = 0; + } + if (gop) + grub_video_unregister (&grub_video_gop_adapter); +} From f704cae368c7716ff60c88f5724dc69d9f25b672 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 28 Nov 2009 00:46:09 +0100 Subject: [PATCH 18/48] Fix declarations of previous commit --- include/grub/efi/graphics_output.h | 2 +- video/efi_gop.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/grub/efi/graphics_output.h b/include/grub/efi/graphics_output.h index 9127a16d1..a55869dc7 100644 --- a/include/grub/efi/graphics_output.h +++ b/include/grub/efi/graphics_output.h @@ -67,7 +67,7 @@ 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); + struct grub_efi_gop_mode_info **info); typedef grub_efi_status_t (*grub_efi_gop_set_mode_t) (struct grub_efi_gop *this, diff --git a/video/efi_gop.c b/video/efi_gop.c index 0123ee274..4cbcaba8d 100644 --- a/video/efi_gop.c +++ b/video/efi_gop.c @@ -288,7 +288,7 @@ grub_video_gop_setup (unsigned int width, unsigned int height, return err; } - framebuffer.ptr = (void *) gop->mode->fb_base; + 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, From c5448046d3b722da86aec9f65bb11b598a7d450e Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Sat, 28 Nov 2009 19:31:30 +0000 Subject: [PATCH 19/48] 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. --- ChangeLog | 7 ++++++ util/mkisofs/mkisofs.c | 51 ++++++++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index d9cabad39..525ee56d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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 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; } From 2f857f9813bea7e5aff9eb4e403b09fb96f8b3bb Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 28 Nov 2009 20:40:44 +0100 Subject: [PATCH 20/48] 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 --- ChangeLog | 13 +++++++++++++ video/efi_gop.c | 4 ++-- video/efi_uga.c | 4 ++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 525ee56d3..a363e60ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +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 diff --git a/video/efi_gop.c b/video/efi_gop.c index 4cbcaba8d..e2eb2f7ae 100644 --- a/video/efi_gop.c +++ b/video/efi_gop.c @@ -380,13 +380,13 @@ static struct grub_video_adapter grub_video_gop_adapter = .next = 0 }; -GRUB_MOD_INIT(efi_fb) +GRUB_MOD_INIT(efi_gop) { if (check_protocol ()) grub_video_register (&grub_video_gop_adapter); } -GRUB_MOD_FINI(efi_fb) +GRUB_MOD_FINI(efi_gop) { if (restore_needed) { diff --git a/video/efi_uga.c b/video/efi_uga.c index b5f3e62f2..31062c5f5 100644 --- a/video/efi_uga.c +++ b/video/efi_uga.c @@ -324,13 +324,13 @@ static struct grub_video_adapter grub_video_uga_adapter = .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_uga_adapter); } -GRUB_MOD_FINI(efi_fb) +GRUB_MOD_FINI(efi_uga) { if (uga) grub_video_unregister (&grub_video_uga_adapter); From dc9837ea5fcf60a0c613aad3da68912d1bd8ba5a Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 29 Nov 2009 12:40:32 +0100 Subject: [PATCH 21/48] 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. --- ChangeLog | 6 ++++++ util/grub-probe.c | 45 ++++++++++++++++++++++++--------------------- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index a363e60ee..5dbdd6a9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/util/grub-probe.c b/util/grub-probe.c index b88fbaaae..2b9784123 100644 --- a/util/grub-probe.c +++ b/util/grub-probe.c @@ -238,33 +238,36 @@ probe (const char *path, char *device_name) if (print == PRINT_FS) { - struct stat st; + if (path) + { + struct stat st; - stat (path, &st); + stat (path, &st); - if (S_ISREG (st.st_mode)) - { - /* Regular file. Verify that we can read it properly. */ + if (S_ISREG (st.st_mode)) + { + /* Regular file. Verify that we can read it properly. */ - grub_file_t file; - char *rel_path; - grub_util_info ("reading %s via OS facilities", path); - filebuf_via_sys = grub_util_read_image (path); + grub_file_t file; + char *rel_path; + grub_util_info ("reading %s via OS facilities", path); + filebuf_via_sys = grub_util_read_image (path); - rel_path = make_system_path_relative_to_its_root (path); - asprintf (&grub_path, "(%s)%s", drive_name, rel_path); - free (rel_path); - grub_util_info ("reading %s via GRUB facilities", grub_path); - file = grub_file_open (grub_path); - if (! file) - grub_util_error ("can not open %s via GRUB facilities", grub_path); - filebuf_via_grub = xmalloc (file->size); - grub_file_read (file, filebuf_via_grub, file->size); + rel_path = make_system_path_relative_to_its_root (path); + asprintf (&grub_path, "(%s)%s", drive_name, rel_path); + free (rel_path); + grub_util_info ("reading %s via GRUB facilities", grub_path); + file = grub_file_open (grub_path); + if (! file) + grub_util_error ("can not open %s via GRUB facilities", grub_path); + filebuf_via_grub = xmalloc (file->size); + grub_file_read (file, filebuf_via_grub, file->size); - grub_util_info ("comparing"); + grub_util_info ("comparing"); - if (memcmp (filebuf_via_grub, filebuf_via_sys, file->size)) - grub_util_error ("files differ"); + if (memcmp (filebuf_via_grub, filebuf_via_sys, file->size)) + grub_util_error ("files differ"); + } } printf ("%s\n", fs->name); From ef34cbd4fa83a963b30c09b5de58021f6823c312 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Mon, 30 Nov 2009 01:25:57 +0000 Subject: [PATCH 22/48] 2009-11-30 Robert Millan Fix $srcdir != $objdir build. * Makefile.in (po/%.po): Rewrite as ... ($(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po)): ... this. --- ChangeLog | 7 +++++++ Makefile.in | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5dbdd6a9c..de7647410 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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. diff --git a/Makefile.in b/Makefile.in index aa8f932c9..c8187796b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -480,7 +480,7 @@ $(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f $< --keyword=_ --keyword=N_ cd $(srcdir) && $(XGETTEXT) --from-code=utf-8 -o $@ -f po/POTFILES-shell -j --language=Shell -po/%.po: po/$(PACKAGE).pot +$(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): po/$(PACKAGE).pot $(MSGMERGE) -U $@ $^ po/%.mo: po/%.po From 181aaf0e597d5e238de60337dc641f6a8f071318 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 30 Nov 2009 19:09:11 +0100 Subject: [PATCH 23/48] Merged mainline into pci --- commands/efi/fixvideo.c | 4 ++-- commands/efi/loadbios.c | 6 ++++-- loader/i386/efi/linux.c | 9 +++++---- loader/i386/efi/xnu.c | 9 +++++---- video/efi_uga.c | 9 +++++---- 5 files changed, 21 insertions(+), 16 deletions(-) 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/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/video/efi_uga.c b/video/efi_uga.c index 31062c5f5..9bca64306 100644 --- a/video/efi_uga.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) { From 14040ebf932c9b12f99ec71331f6c616e1552d2d Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 2 Dec 2009 09:03:51 +0100 Subject: [PATCH 24/48] ChangeLog --- ChangeLog.pciaccess | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ChangeLog.pciaccess diff --git a/ChangeLog.pciaccess b/ChangeLog.pciaccess new file mode 100644 index 000000000..b402a3b60 --- /dev/null +++ b/ChangeLog.pciaccess @@ -0,0 +1,22 @@ +2009-12-02 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. + From c8dea671ff2e0836351afa606608955c9dbdf2cf Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 2 Dec 2009 17:13:45 +0100 Subject: [PATCH 25/48] 2009-12-02 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". --- ChangeLog.kimg | 21 +++++++++++++++++++++ conf/i386-efi.rmk | 20 ++++++++++---------- conf/x86_64-efi.rmk | 20 ++++++++++---------- util/i386/efi/grub-mkimage.c | 6 +++--- 4 files changed, 44 insertions(+), 23 deletions(-) create mode 100644 ChangeLog.kimg diff --git a/ChangeLog.kimg b/ChangeLog.kimg new file mode 100644 index 000000000..ee0936bb9 --- /dev/null +++ b/ChangeLog.kimg @@ -0,0 +1,21 @@ +2009-12-02 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". diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk index c135ded4e..df9ef8082 100644 --- a/conf/i386-efi.rmk +++ b/conf/i386-efi.rmk @@ -30,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 \ @@ -48,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. diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk index 22ed2d639..47a2e41e5 100644 --- a/conf/x86_64-efi.rmk +++ b/conf/x86_64-efi.rmk @@ -29,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 \ @@ -47,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. diff --git a/util/i386/efi/grub-mkimage.c b/util/i386/efi/grub-mkimage.c index 401c5006c..7f5141531 100644 --- a/util/i386/efi/grub-mkimage.c +++ b/util/i386/efi/grub-mkimage.c @@ -55,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); @@ -945,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"); From 5239348f1805608a1bda98425738cb22d56bf85d Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Wed, 2 Dec 2009 22:48:02 +0000 Subject: [PATCH 26/48] 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"'. --- ChangeLog | 15 +++++++++++++++ conf/i386-coreboot.rmk | 4 +++- include/grub/i386/reboot.h | 2 +- kern/i386/pc/startup.S | 15 --------------- kern/i386/qemu/startup.S | 2 ++ kern/i386/realmode.S | 17 +++++++++++++++++ kern/i386/reboot.c | 32 -------------------------------- 7 files changed, 38 insertions(+), 49 deletions(-) delete mode 100644 kern/i386/reboot.c diff --git a/ChangeLog b/ChangeLog index de7647410..db94fca9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +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. diff --git a/conf/i386-coreboot.rmk b/conf/i386-coreboot.rmk index ccc326f5c..541b0777e 100644 --- a/conf/i386-coreboot.rmk +++ b/conf/i386-coreboot.rmk @@ -33,6 +33,7 @@ kernel_img_SOURCES = kern/i386/coreboot/startup.S \ 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 \ + cpu/reboot.h \ machine/boot.h machine/console.h machine/init.h \ machine/memory.h machine/loader.h list.h handler.h command.h i18n.h kernel_img_CFLAGS = $(COMMON_CFLAGS) @@ -76,6 +77,7 @@ kernel_img_SOURCES = kern/i386/qemu/startup.S \ 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 \ + cpu/reboot.h \ machine/boot.h machine/console.h machine/init.h \ machine/memory.h machine/loader.h list.h handler.h command.h i18n.h kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR) @@ -124,7 +126,7 @@ 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) diff --git a/include/grub/i386/reboot.h b/include/grub/i386/reboot.h index 5bcbb5d64..1f2da1d5c 100644 --- a/include/grub/i386/reboot.h +++ b/include/grub/i386/reboot.h @@ -16,4 +16,4 @@ * along with GRUB. If not, see . */ -extern void grub_reboot (void); +extern void EXPORT_FUNC(grub_reboot) (void); 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"); -} From 4b2e6ca2b6f14122e2c508debee750d46c33ac9f Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 3 Dec 2009 12:18:56 +0100 Subject: [PATCH 27/48] 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. --- ChangeLog | 10 ++++++++++ conf/sparc64-ieee1275.rmk | 6 +++--- util/sparc64/ieee1275/grub-mkimage.c | 3 +++ util/sparc64/ieee1275/grub-ofpathname.c | 4 ++++ util/sparc64/ieee1275/grub-setup.c | 5 ++++- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index db94fca9e..9ceebeb41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +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 diff --git a/conf/sparc64-ieee1275.rmk b/conf/sparc64-ieee1275.rmk index 8c8bf27e6..d19e927a5 100644 --- a/conf/sparc64-ieee1275.rmk +++ b/conf/sparc64-ieee1275.rmk @@ -63,7 +63,7 @@ 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,12 +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-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/util/sparc64/ieee1275/grub-mkimage.c b/util/sparc64/ieee1275/grub-mkimage.c index 5260996f6..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) diff --git a/util/sparc64/ieee1275/grub-ofpathname.c b/util/sparc64/ieee1275/grub-ofpathname.c index 4b852698f..166ce4cbe 100644 --- a/util/sparc64/ieee1275/grub-ofpathname.c +++ b/util/sparc64/ieee1275/grub-ofpathname.c @@ -20,6 +20,10 @@ #include #include +#include + +#include "progname.h" + int main(int argc, char **argv) { char *of_path; diff --git a/util/sparc64/ieee1275/grub-setup.c b/util/sparc64/ieee1275/grub-setup.c index 6ce8cdf6d..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. * @@ -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 +", program_name, DEFAULT_BOOT_FILE, DEFAULT_CORE_FILE, DEFAULT_DIRECTORY, DEFAULT_DEVICE_MAP, PACKAGE_BUGREPORT); From 6b8474f8e8746d72fbfc73b375f7cfd1a0d6eaec Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Thu, 3 Dec 2009 23:07:29 +0000 Subject: [PATCH 28/48] 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 `'. --- ChangeLog | 23 +++++++++++++++++++++++ commands/halt.c | 10 +--------- commands/i386/pc/halt.c | 2 +- commands/reboot.c | 13 +------------ conf/i386-coreboot.rmk | 6 +++--- include/grub/efi/efi.h | 2 -- include/grub/i386/halt.h | 19 ------------------- include/grub/i386/pc/init.h | 7 ------- include/grub/i386/reboot.h | 19 ------------------- include/grub/misc.h | 11 +++++++++++ include/grub/powerpc/ieee1275/kernel.h | 3 --- include/grub/sparc64/ieee1275/kernel.h | 3 --- kern/i386/halt.c | 1 - 13 files changed, 40 insertions(+), 79 deletions(-) delete mode 100644 include/grub/i386/halt.h delete mode 100644 include/grub/i386/reboot.h diff --git a/ChangeLog b/ChangeLog index 9ceebeb41..933fc3f7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +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, 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/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/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/i386-coreboot.rmk b/conf/i386-coreboot.rmk index 541b0777e..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 \ @@ -33,7 +34,6 @@ kernel_img_SOURCES = kern/i386/coreboot/startup.S \ 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 \ - cpu/reboot.h \ machine/boot.h machine/console.h machine/init.h \ machine/memory.h machine/loader.h list.h handler.h command.h i18n.h kernel_img_CFLAGS = $(COMMON_CFLAGS) @@ -62,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 \ @@ -77,7 +78,6 @@ kernel_img_SOURCES = kern/i386/qemu/startup.S \ 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 \ - cpu/reboot.h \ machine/boot.h machine/console.h machine/init.h \ machine/memory.h machine/loader.h list.h handler.h command.h i18n.h kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR) @@ -131,7 +131,7 @@ 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/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/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/reboot.h b/include/grub/i386/reboot.h deleted file mode 100644 index 1f2da1d5c..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 EXPORT_FUNC(grub_reboot) (void); diff --git a/include/grub/misc.h b/include/grub/misc.h index 31d4ddf85..79dafa831 100644 --- a/include/grub/misc.h +++ b/include/grub/misc.h @@ -222,4 +222,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/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/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 From fb954db0d5306aa984afe5a21217f9f47c7b64ac Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Sat, 5 Dec 2009 01:43:17 +0000 Subject: [PATCH 29/48] 2009-12-05 Robert Millan * kern/ieee1275/openfw.c (grub_reboot): Disable for i386. The non-firmware-dependant one in realmode.S takes precedence. --- ChangeLog | 5 +++++ kern/ieee1275/openfw.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 933fc3f7b..3c144e593 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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 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) From 013d67a14914c55e838a9174bbf2521cd6d1f52e Mon Sep 17 00:00:00 2001 From: Carles Pina i Estany Date: Sat, 5 Dec 2009 09:25:46 +0000 Subject: [PATCH 30/48] 2009-12-05 Carles Pina i Estany * gettext/gettext.c (grub_gettext_init_ext): Replace grub_printf with grub_dprintf. --- ChangeLog | 5 +++++ gettext/gettext.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3c144e593..1b56d3d01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gettext/gettext.c b/gettext/gettext.c index 856265e6f..b2c468a02 100644 --- a/gettext/gettext.c +++ b/gettext/gettext.c @@ -222,7 +222,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."); return; } From 57bbe3beb16e6fb3650b80a8f2c6485e7f56055a Mon Sep 17 00:00:00 2001 From: Carles Pina i Estany Date: Sat, 5 Dec 2009 09:31:36 +0000 Subject: [PATCH 31/48] 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. --- ChangeLog | 5 +++++ util/grub-install.in | 8 ++++++++ util/grub-mkrescue.in | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1b56d3d01..13598ad5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/util/grub-install.in b/util/grub-install.in index 356e161e7..4df620812 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -247,6 +247,14 @@ if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then 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-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 From f616f51c3c9e7b2b41abd2e796376f32e1672805 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 5 Dec 2009 11:08:26 +0100 Subject: [PATCH 32/48] 2009-12-05 Vladimir Serbinenko * configure.ac (TARGET_ASFLAGS): Add "-D". --- ChangeLog | 4 ++++ configure.ac | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 13598ad5c..c743b0a1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +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. diff --git a/configure.ac b/configure.ac index 08667d976..b654adeed 100644 --- a/configure.ac +++ b/configure.ac @@ -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) From 69055f8a2f1bf6315aaa31d0b80bac66a1e80df5 Mon Sep 17 00:00:00 2001 From: Carles Pina i Estany Date: Sat, 5 Dec 2009 11:25:07 +0000 Subject: [PATCH 33/48] 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. --- ChangeLog | 19 ++++++ normal/menu_entry.c | 11 ++- normal/menu_text.c | 158 ++++++++++++++++++++++++++++++++++++++------ po/POTFILES | 1 + 4 files changed, 164 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index c743b0a1f..dc4fe3853 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +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". diff --git a/normal/menu_entry.c b/normal/menu_entry.c index 7478c33ae..18d4719dc 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 (_("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 (_("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 (_("Press any key to continue...")); (void) grub_getkey (); } diff --git a/normal/menu_text.c b/normal/menu_text.c index 4ff22e928..c40fd6374 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 (_("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 (_("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 (_("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 (_("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 (_("Failed to boot default entries.\n")); grub_wait_after_message (); } 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 From 98d3dc02fe195ff73350abec4112fe3af392fa65 Mon Sep 17 00:00:00 2001 From: Carles Pina i Estany Date: Sat, 5 Dec 2009 19:03:27 +0000 Subject: [PATCH 34/48] 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. --- ChangeLog | 14 ++++++++++ gettext/gettext.c | 71 ++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 78 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78d534a3b..77b2165ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +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. diff --git a/gettext/gettext.c b/gettext/gettext.c index b2c468a02..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_dprintf ("gettext", "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; } From df91e6790082e250c1c04a4d8ca2154be7329f62 Mon Sep 17 00:00:00 2001 From: Felix Zielcke Date: Sun, 6 Dec 2009 10:20:01 +0100 Subject: [PATCH 35/48] 2009-12-06 Felix Zielcke * util/misc.c (make_system_path_relative_to_its_root): Correctly cope with mount points. --- ChangeLog | 5 +++++ util/misc.c | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 77b2165ab..53667833e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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, diff --git a/util/misc.c b/util/misc.c index 626851306..d46051efe 100644 --- a/util/misc.c +++ b/util/misc.c @@ -500,7 +500,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. */ From de6daa8b56a9bae8f27d240f108071ed24c30e2d Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 7 Dec 2009 11:54:25 +0100 Subject: [PATCH 36/48] 2009-12-06 David S. Miller * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Recognize anything even prefixed with 'cdrom' as a cdrom. --- ChangeLog | 5 +++++ disk/ieee1275/ofdisk.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 53667833e..479098cda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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 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; } From d6ceebf1d9c0e112440f142c867f908293e31d75 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 7 Dec 2009 16:46:24 +0000 Subject: [PATCH 37/48] 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. --- ChangeLog | 13 +++++++++++++ configure.ac | 2 +- include/grub/util/misc.h | 9 +++++++++ util/getroot.c | 8 ++++---- util/grub-editenv.c | 2 +- util/grub-mkfont.c | 4 ++-- util/grub-probe.c | 2 +- util/hostdisk.c | 10 +++++----- util/misc.c | 36 ++++++++++++++++++++++++++++++++---- 9 files changed, 68 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 479098cda..5acbe4945 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +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 diff --git a/configure.ac b/configure.ac index b654adeed..474de70be 100644 --- a/configure.ac +++ b/configure.ac @@ -194,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 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/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 842c5a103..68fb23b15 100644 --- a/util/grub-editenv.c +++ b/util/grub-editenv.c @@ -107,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); diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c index 40d145fd3..9775e0803 100644 --- a/util/grub-mkfont.c +++ b/util/grub-mkfont.c @@ -366,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); diff --git a/util/grub-probe.c b/util/grub-probe.c index 2b9784123..6d421445c 100644 --- a/util/grub-probe.c +++ b/util/grub-probe.c @@ -254,7 +254,7 @@ probe (const char *path, char *device_name) 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); + 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); 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/misc.c b/util/misc.c index d46051efe..d75aa0952 100644 --- a/util/misc.c +++ b/util/misc.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -370,6 +371,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 @@ -378,11 +392,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; @@ -390,6 +401,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) From e3069ec1a5ac240fed7c6b4983fbc0ab0f568ef2 Mon Sep 17 00:00:00 2001 From: Carles Pina i Estany Date: Tue, 8 Dec 2009 00:08:52 +0000 Subject: [PATCH 38/48] 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. --- ChangeLog | 14 ++++++++++++++ include/grub/misc.h | 1 + kern/misc.c | 13 +++++++++++++ normal/main.c | 2 +- normal/menu_entry.c | 6 +++--- normal/menu_text.c | 10 +++++----- 6 files changed, 37 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5acbe4945..dc475c96c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +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. diff --git a/include/grub/misc.h b/include/grub/misc.h index 79dafa831..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, 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/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 18d4719dc..7a31c27af 100644 --- a/normal/menu_entry.c +++ b/normal/menu_entry.c @@ -837,7 +837,7 @@ store_completion (const char *item, grub_completion_type_t type, int count) grub_gotoxy (0, GRUB_TERM_HEIGHT - 3); grub_printf (" "); - grub_printf (_("Possible %s are:"), what); + grub_printf_ (N_("Possible %s are:"), what); grub_printf ("\n "); } @@ -1000,7 +1000,7 @@ run (struct screen *screen) grub_cls (); grub_printf (" "); - grub_printf (_("Booting a command list")); + grub_printf_ (N_("Booting a command list")); grub_printf ("\n\n"); @@ -1182,6 +1182,6 @@ grub_menu_entry_run (grub_menu_entry_t entry) grub_print_error (); grub_errno = GRUB_ERR_NONE; grub_putchar ('\n'); - grub_printf (_("Press any key to continue...")); + grub_printf_ (N_("Press any key to continue...")); (void) grub_getkey (); } diff --git a/normal/menu_text.c b/normal/menu_text.c index c40fd6374..bb1f52203 100644 --- a/normal/menu_text.c +++ b/normal/menu_text.c @@ -40,7 +40,7 @@ void grub_wait_after_message (void) { grub_putchar ('\n'); - grub_printf (_("Press any key to continue...")); + grub_printf_ (N_("Press any key to continue...")); (void) grub_getkey (); grub_putchar ('\n'); } @@ -206,7 +206,7 @@ entry is highlighted."); if (nested) { grub_printf ("\n "); - grub_printf (_("ESC to return previous menu.")); + grub_printf_ (N_("ESC to return previous menu.")); } } } @@ -627,7 +627,7 @@ notify_booting (grub_menu_entry_t entry, void *userdata __attribute__((unused))) { grub_printf (" "); - grub_printf (_("Booting \'%s\'"), entry->title); + grub_printf_ (N_("Booting \'%s\'"), entry->title); grub_printf ("\n\n"); } @@ -639,7 +639,7 @@ notify_fallback (grub_menu_entry_t entry, void *userdata __attribute__((unused))) { grub_printf ("\n "); - grub_printf (_("Falling back to \'%s\'"), entry->title); + grub_printf_ (N_("Falling back to \'%s\'"), entry->title); grub_printf ("\n\n"); grub_millisleep (DEFAULT_ENTRY_ERROR_DELAY_MS); } @@ -655,7 +655,7 @@ notify_execution_failure (void *userdata __attribute__((unused))) grub_errno = GRUB_ERR_NONE; } grub_printf ("\n "); - grub_printf (_("Failed to boot default entries.\n")); + grub_printf_ (N_("Failed to boot default entries.\n")); grub_wait_after_message (); } From 7c7b61062648818f957ab0aac1d391f1bb042875 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Tue, 8 Dec 2009 16:00:52 +0000 Subject: [PATCH 39/48] 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'. --- ChangeLog | 6 ++++++ conf/common.rmk | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dc475c96c..2c5df8421 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/conf/common.rmk b/conf/common.rmk index 896705526..56f17e4e7 100644 --- a/conf/common.rmk +++ b/conf/common.rmk @@ -3,7 +3,13 @@ sbin_UTILITIES += grub-mkdevicemap grub_mkdevicemap_SOURCES = gnulib/progname.c util/grub-mkdevicemap.c \ util/deviceiter.c \ - util/devicemap.c util/misc.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 From c631d9fb172da3537ecaef20e8479a002f22ec18 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 9 Dec 2009 16:20:17 +0000 Subject: [PATCH 40/48] 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. --- ChangeLog | 10 ++++++++++ util/grub-mkconfig_lib.in | 8 ++++++-- util/sparc64/ieee1275/grub-install.in | 6 +++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c5df8421..41bbb3518 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +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 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/sparc64/ieee1275/grub-install.in b/util/sparc64/ieee1275/grub-install.in index a03869cb3..5cfb858d7 100644 --- a/util/sparc64/ieee1275/grub-install.in +++ b/util/sparc64/ieee1275/grub-install.in @@ -31,9 +31,6 @@ target_cpu=@target_cpu@ platform=@platform@ pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}` -# for make_system_path_relative_to_its_root() -. ${libdir}/grub/grub-mkconfig_lib - grub_setup=${sbindir}/`echo grub-setup | sed ${transform}` grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}` grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}` @@ -120,6 +117,9 @@ for option in "$@"; do 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 From 1a0f7f4553408e9294e3c9fba8ce47768b321dc8 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Wed, 9 Dec 2009 21:43:05 +0000 Subject: [PATCH 41/48] 2009-12-09 Bruce Dubbs Remove miscellaneous files in distclean target. * Makefile.in: Remove docs/{grub.info,version.texi,stamp-vti} --- ChangeLog | 6 ++++++ Makefile.in | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 41bbb3518..b145d0c7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/Makefile.in b/Makefile.in index c8187796b..9c7c735d7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -139,7 +139,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) From e1f270654e836df3e7862e5a83e1be2dc5456884 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Thu, 10 Dec 2009 13:26:22 +0100 Subject: [PATCH 42/48] 2009-12-10 Vladimir Serbinenko * kern/device.c (grub_device_iterate): Ignore errors during first scan. Fixes amarsh bug. --- ChangeLog | 5 +++++ kern/device.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index b145d0c7d..e87ddefe3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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. 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) { From 2520d4b815b8a376251c153137441c2294f4d60a Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Thu, 10 Dec 2009 14:37:42 +0100 Subject: [PATCH 43/48] 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. --- ChangeLog | 7 +++++++ commands/hexdump.c | 6 +++--- lib/arg.c | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e87ddefe3..a1c5d5e89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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. 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/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, From 71ee178adbbbac98857fba1f93e4e08468398a5d Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Thu, 10 Dec 2009 14:39:54 +0100 Subject: [PATCH 44/48] 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. --- ChangeLog | 7 +++++++ util/grub-fstest.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a1c5d5e89..4a9801412 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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. diff --git a/util/grub-fstest.c b/util/grub-fstest.c index 03184b632..fa54fe414 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -85,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)) @@ -140,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; } From 2e59983c8262aeb248f95022659c006ff449e682 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Thu, 10 Dec 2009 14:45:00 +0100 Subject: [PATCH 45/48] 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. --- ChangeLog | 17 +++++++++++++++ fs/ntfs.c | 51 ++++++++++++++++++++++++--------------------- fs/ntfscomp.c | 2 +- include/grub/ntfs.h | 3 ++- 4 files changed, 47 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a9801412..573ac3bf0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +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. 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/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; From 0d56ed64d2b7d3d7dc3e4a245a2f0f0b9cb1f22d Mon Sep 17 00:00:00 2001 From: Felix Zielcke Date: Thu, 10 Dec 2009 19:15:20 +0100 Subject: [PATCH 46/48] 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. --- ChangeLog | 6 ++++++ disk/i386/pc/biosdisk.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 573ac3bf0..86a2a9d8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +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. 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); } } } From 8d0502d9b250fb924c5d7045cf9cdd6f4e146e09 Mon Sep 17 00:00:00 2001 From: Felix Zielcke Date: Fri, 11 Dec 2009 11:11:34 +0100 Subject: [PATCH 47/48] 2009-12-11 Felix Zielcke * util/misc.c: Don't include twice. --- ChangeLog | 4 ++++ util/misc.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 86a2a9d8b..668cc3e88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +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 diff --git a/util/misc.c b/util/misc.c index d75aa0952..5896da0c8 100644 --- a/util/misc.c +++ b/util/misc.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include From 2a4bfcf0da2ab1c084ce33e43595afbc053ab46b Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Fri, 11 Dec 2009 22:44:47 +0000 Subject: [PATCH 48/48] 2009-12-11 Robert Millan * THANKS: Add David Miller. --- ChangeLog | 4 ++++ THANKS | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index e7e873000..de12dd0da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-12-11 Robert Millan + + * THANKS: Add David Miller. + 2009-12-11 Vladimir Serbinenko libpciaccess support. 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