Various fixes nice to have in the GRUB 2.06 release
cover Various fixes nice to have in the GRUB 2.06 release
Hey,
As in subject...
Daniel
docs/grub-dev.texi | 2 +- docs/grub.texi | 4 +++- grub-core/commands/ls.c | 2 +- grub-core/commands/terminal.c | 10 +++++----- grub-core/kern/efi/mm.c | 10 +++++++--- grub-core/term/terminfo.c | 4 ++-- 6 files changed, 19 insertions(+), 13 deletions(-)
Daniel Kiper (3):
i18n: Format large integers before the translation message - take 2
i18n: Align N_() formatting with the rest of GRUB code term/terminfo: Fix the terminfo command help and documentation
PATCH 1/3 i18n: Format large integers before the translation message - take 2
This is an additional fix which has been missing from the commit 837fe48de (i18n: Format large integers before the translation message).
--- grub-core/kern/efi/mm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
grub-core/kern/efi/mm.c +7 -3
@@ -126,10 +126,14 @@ grub_efi_allocate_pages_real (grub_efi_physical_address_t address,/* Limit the memory access to less than 4GB for 32-bit platforms. */ if (address >GRUB_EFI_MAX_USABLE_ADDRESS ) { +char inv_addr[17 ], max_addr[17 ];/* log16(2^64) = 16, plus NUL. */ + +grub_snprintf (inv_addr,sizeof (inv_addr) -1 ,"%" PRIxGRUB_UINT64_T, + address); +grub_snprintf (max_addr,sizeof (max_addr) -1 ,"%" PRIxGRUB_UINT64_T, + (grub_efi_uint64_t )GRUB_EFI_MAX_USABLE_ADDRESS );grub_error (GRUB_ERR_BAD_ARGUMENT , -N_ ("invalid memory address (0x%" PRIxGRUB_UINT64_T -" > 0x%" PRIxGRUB_UINT64_T")" ), - address, (grub_efi_uint64_t )GRUB_EFI_MAX_USABLE_ADDRESS ); +N_ ("invalid memory address (0x%s > 0x%s)" ), inv_addr, max_addr);return NULL ; }
Signature · 1 line
2.11.0
Re: [PATCH 2.06 RELEASE 1/3] i18n: Format large integers before the translation message - take 2
Quoted 5 lines · Daniel Kiper
This is an additional fix which has been missing from the commit
837fe48de(i18n: Format large integers before the translation message).Signed-off-by Daniel Kiper <[email protected]>---
Looks good to me.
Best regards,
Signature · 3 lines
Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat
PATCH 2/3 i18n: Align N_() formatting with the rest of GRUB code
In reply to Daniel Kiper--- grub-core/commands/ls.c | 2 +- grub-core/commands/terminal.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
grub-core/commands/ls.c +1 -1
@@ -70,7 +70,7 @@ grub_ls_list_devices (int longlist)FOR_NET_APP_LEVEL (proto) {if (first) -grub_puts_ (N_ ("Network protocols:" )); +grub_puts_ (N_ ("Network protocols:" )); first =0 ;grub_printf ("%s " , proto->name); }
grub-core/commands/terminal.c +5 -5
@@ -87,7 +87,7 @@ handle_command (int argc, char **args, struct abstract_terminal **enabled, i++;if (i == argc) -return grub_error (GRUB_ERR_BAD_ARGUMENT ,N_ ("no terminal specified" )); +return grub_error (GRUB_ERR_BAD_ARGUMENT ,N_ ("no terminal specified" ));for (; i < argc; i++) {
@@ -241,8 +241,8 @@ grub_cmd_terminal_input (grub_command_t cmd __attribute__ ((unused)), (struct abstract_terminal **) (void *) &grub_term_inputs, (struct abstract_terminal **) (void *) &grub_term_inputs_disabled, grub_term_input_autoload, -N_ ("Active input terminals:" ), - N_ ("Available input terminals:")); +N_ ("Active input terminals:" ), + N_("Available input terminals:")); } static grub_err_t
@@ -258,8 +258,8 @@ grub_cmd_terminal_output (grub_command_t cmd __attribute__ ((unused)), (struct abstract_terminal **) (void *) &grub_term_outputs, (struct abstract_terminal **) (void *) &grub_term_outputs_disabled, grub_term_output_autoload, -N_ ("Active output terminals:" ), - N_ ("Available output terminals:")); +N_ ("Active output terminals:" ), + N_("Available output terminals:")); }static grub_command_t cmd_terminal_input, cmd_terminal_output;
Signature · 1 line
2.11.0
Re: [PATCH 2.06 RELEASE 2/3] i18n: Align N_() formatting with the rest of GRUB code
Quoted 11 lines · Daniel Kiper
Signed-off-by Daniel Kiper <[email protected]>--- grub-core/commands/ls.c | 2 +- grub-core/commands/terminal.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)grub-core/commands/ls.c +0
-0
grub-core/commands/ls.c grub_ls_list_devices (int longlist) · line 73
Quoted 5 lines
grub-core/commands/ls.c +1
-1@@ -70,7 +70,7 @@ grub_ls_list_devices (int longlist)FOR_NET_APP_LEVEL (proto) {if (first) -grub_puts_ (N_ ("Network protocols:" )); +grub_puts_ (N_ ("Network protocols:" ));
Is part of the coding style that functions calls should have a space between the function name and the parenthesis but not when using macros ? I haven't found anything about it in the docs/grub-dev.texi file.
But it's true that this change makes it consistent with the rest of the GRUB codebase, so the patch looks good to me.
Best regards,
Signature · 3 lines
Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat
Re: [PATCH 2.06 RELEASE 2/3] i18n: Align N_() formatting with the rest of GRUB code
Quoted 7 lines · Javier Martinez Canillas
Quoted 6 lines · Daniel Kiper
Signed-off-by Daniel Kiper <[email protected]>--- grub-core/commands/ls.c | 2 +- grub-core/commands/terminal.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
Quoted 14 lines
grub-core/commands/ls.c grub_ls_list_devices (int longlist) · line 73
Quoted 10 lines
grub-core/commands/ls.c +1
-1@@ -70,7 +70,7 @@ grub_ls_list_devices (int longlist)FOR_NET_APP_LEVEL (proto) {if (first) -grub_puts_ (N_ ("Network protocols:" )); +grub_puts_ (N_ ("Network protocols:" ));Is part of the coding style that functions calls should have a space between the function name and the parenthesis but not when using macros ? I haven't found anything about it in the docs/grub-dev.texi file.
As I can see from the code the translation macros are exception from the "extra space" rule.
Quoted 4 lines
But it's true that this change makes it consistent with the rest of the GRUB codebase, so the patch looks good to me.
Reviewed-by Javier Martinez Canillas <[email protected]>
Thanks a lot!
Daniel
PATCH 3/3 term/terminfo: Fix the terminfo command help and documentation
In reply to Daniel KiperAdditionally, fix the terminfo spelling mistake in the GRUB development documentation.
--- docs/grub-dev.texi | 2 +- docs/grub.texi | 4 +++- grub-core/term/terminfo.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-)
docs/grub-dev.texi +1 -1
@@ -820,7 +820,7 @@ Of video is loongson (kern/mips/loongson/init.c). Note that terminfo has to be inited in 2 stages: one before (to get at least rudimentary console as early as possible) and another after the heap (to get full-featured console). For the input there are string of keys, terminfo and direct hardware. For string -of keys look at i386-pc (same files), for termino ieee1275 (same files) and for +of keys look at i386-pc (same files), for terminfo ieee1275 (same files) and for hardware loongson (kern/mips/loongson/init.c and term/at_keyboard.c). For the timer you'll need to call grub_install_get_time_ms (...) with as sole
docs/grub.texi +3 -1
@@ -3934,7 +3934,7 @@ names active. @node terminfo @subsection terminfo -@deffn Command terminfo [-a|-u|-v] [term] +@deffn Command terminfo [@option{-a}|@option{-u}|@option{-v}] [@option{-g WxH}] [term] [type] Define the capabilities of your terminal by giving the name of an entry in the terminfo database, which should correspond roughly to a @samp{TERM} environment variable in Unix.
@@ -3951,6 +3951,8 @@ specifies logically-ordered UTF-8; and @option{-v} specifies emulator without bidirectional text support will display right-to-left text in the proper order; this is not really proper UTF-8, but a workaround). +The @option{-g} (@option{--geometry}) can be used to specify terminal geometry. + If no option or terminal type is specified, the current terminal type is printed. @end deffn
grub-core/term/terminfo.c +2 -2
@@ -785,8 +785,8 @@ static grub_extcmd_t cmd;GRUB_MOD_INIT (terminfo) { cmd =grub_register_extcmd ("terminfo" , grub_cmd_terminfo,0 , -N_ ("[[-a|-u|-v] [-g WxH] TERM [TYPE]]" ), -N_ ("Set terminfo type of TERM to TYPE.\n" ), +N_ ("[[-a|-u|-v] [-g WxH] [TERM] [TYPE]]" ), +N_ ("Set terminfo type of TERM to TYPE.\n" ), options); }
Signature · 1 line
2.11.0
Re: [PATCH 2.06 RELEASE 3/3] term/terminfo: Fix the terminfo command help and documentation
Quoted 5 lines · Daniel Kiper
Additionally, fix the terminfo spelling mistake in the GRUB development documentation.
Signed-off-by Daniel Kiper <[email protected]>---
Best regards,
Signature · 3 lines
Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat