All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.06 RELEASE 0/3] Various fixes nice to have in the GRUB 2.06 release
@ 2021-04-14 15:48 Daniel Kiper
  2021-04-14 15:48 ` [PATCH 2.06 RELEASE 1/3] i18n: Format large integers before the translation message - take 2 Daniel Kiper
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Daniel Kiper @ 2021-04-14 15:48 UTC (permalink / raw)
  To: grub-devel; +Cc: javierm, phcoder

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2.06 RELEASE 1/3] i18n: Format large integers before the translation message - take 2
  2021-04-14 15:48 [PATCH 2.06 RELEASE 0/3] Various fixes nice to have in the GRUB 2.06 release Daniel Kiper
@ 2021-04-14 15:48 ` Daniel Kiper
  2021-04-23 15:42   ` Javier Martinez Canillas
  2021-04-14 15:48 ` [PATCH 2.06 RELEASE 2/3] i18n: Align N_() formatting with the rest of GRUB code Daniel Kiper
  2021-04-14 15:48 ` [PATCH 2.06 RELEASE 3/3] term/terminfo: Fix the terminfo command help and documentation Daniel Kiper
  2 siblings, 1 reply; 8+ messages in thread
From: Daniel Kiper @ 2021-04-14 15:48 UTC (permalink / raw)
  To: grub-devel; +Cc: javierm, phcoder

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 <daniel.kiper@oracle.com>
---
 grub-core/kern/efi/mm.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
index 0cdb063bb..9838fb2f5 100644
--- a/grub-core/kern/efi/mm.c
+++ b/grub-core/kern/efi/mm.c
@@ -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;
     }
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2.06 RELEASE 2/3] i18n: Align N_() formatting with the rest of GRUB code
  2021-04-14 15:48 [PATCH 2.06 RELEASE 0/3] Various fixes nice to have in the GRUB 2.06 release Daniel Kiper
  2021-04-14 15:48 ` [PATCH 2.06 RELEASE 1/3] i18n: Format large integers before the translation message - take 2 Daniel Kiper
@ 2021-04-14 15:48 ` Daniel Kiper
  2021-04-23 15:49   ` Javier Martinez Canillas
  2021-04-14 15:48 ` [PATCH 2.06 RELEASE 3/3] term/terminfo: Fix the terminfo command help and documentation Daniel Kiper
  2 siblings, 1 reply; 8+ messages in thread
From: Daniel Kiper @ 2021-04-14 15:48 UTC (permalink / raw)
  To: grub-devel; +Cc: javierm, phcoder

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 grub-core/commands/ls.c       |  2 +-
 grub-core/commands/terminal.c | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/grub-core/commands/ls.c b/grub-core/commands/ls.c
index 326d2d6b4..8e98c73cc 100644
--- a/grub-core/commands/ls.c
+++ b/grub-core/commands/ls.c
@@ -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);
     }
diff --git a/grub-core/commands/terminal.c b/grub-core/commands/terminal.c
index 3002186d2..37e0ab8b1 100644
--- a/grub-core/commands/terminal.c
+++ b/grub-core/commands/terminal.c
@@ -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;
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2.06 RELEASE 3/3] term/terminfo: Fix the terminfo command help and documentation
  2021-04-14 15:48 [PATCH 2.06 RELEASE 0/3] Various fixes nice to have in the GRUB 2.06 release Daniel Kiper
  2021-04-14 15:48 ` [PATCH 2.06 RELEASE 1/3] i18n: Format large integers before the translation message - take 2 Daniel Kiper
  2021-04-14 15:48 ` [PATCH 2.06 RELEASE 2/3] i18n: Align N_() formatting with the rest of GRUB code Daniel Kiper
@ 2021-04-14 15:48 ` Daniel Kiper
  2021-04-23 15:51   ` Javier Martinez Canillas
  2 siblings, 1 reply; 8+ messages in thread
From: Daniel Kiper @ 2021-04-14 15:48 UTC (permalink / raw)
  To: grub-devel; +Cc: javierm, phcoder

Additionally, fix the terminfo spelling mistake in
the GRUB development documentation.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 docs/grub-dev.texi        | 2 +-
 docs/grub.texi            | 4 +++-
 grub-core/term/terminfo.c | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi
index a834b3a9c..6c629a23e 100644
--- a/docs/grub-dev.texi
+++ b/docs/grub-dev.texi
@@ -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
diff --git a/docs/grub.texi b/docs/grub.texi
index e2c58415a..f8b4b3b21 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -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
diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
index cd7200803..85ecf06b4 100644
--- a/grub-core/term/terminfo.c
+++ b/grub-core/term/terminfo.c
@@ -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);
 }
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2.06 RELEASE 1/3] i18n: Format large integers before the translation message - take 2
  2021-04-14 15:48 ` [PATCH 2.06 RELEASE 1/3] i18n: Format large integers before the translation message - take 2 Daniel Kiper
@ 2021-04-23 15:42   ` Javier Martinez Canillas
  0 siblings, 0 replies; 8+ messages in thread
From: Javier Martinez Canillas @ 2021-04-23 15:42 UTC (permalink / raw)
  To: Daniel Kiper, grub-devel; +Cc: phcoder

On 4/14/21 5:48 PM, Daniel Kiper wrote:
> 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 <daniel.kiper@oracle.com>
> ---
Looks good to me.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

Best regards,
-- 
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement
Red Hat



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2.06 RELEASE 2/3] i18n: Align N_() formatting with the rest of GRUB code
  2021-04-14 15:48 ` [PATCH 2.06 RELEASE 2/3] i18n: Align N_() formatting with the rest of GRUB code Daniel Kiper
@ 2021-04-23 15:49   ` Javier Martinez Canillas
  2021-04-26 17:27     ` Daniel Kiper
  0 siblings, 1 reply; 8+ messages in thread
From: Javier Martinez Canillas @ 2021-04-23 15:49 UTC (permalink / raw)
  To: Daniel Kiper, grub-devel; +Cc: phcoder

On 4/14/21 5:48 PM, Daniel Kiper wrote:
> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
>  grub-core/commands/ls.c       |  2 +-
>  grub-core/commands/terminal.c | 10 +++++-----
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/grub-core/commands/ls.c b/grub-core/commands/ls.c
> index 326d2d6b4..8e98c73cc 100644
> --- a/grub-core/commands/ls.c
> +++ b/grub-core/commands/ls.c
> @@ -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.

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

Best regards,
-- 
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement
Red Hat



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2.06 RELEASE 3/3] term/terminfo: Fix the terminfo command help and documentation
  2021-04-14 15:48 ` [PATCH 2.06 RELEASE 3/3] term/terminfo: Fix the terminfo command help and documentation Daniel Kiper
@ 2021-04-23 15:51   ` Javier Martinez Canillas
  0 siblings, 0 replies; 8+ messages in thread
From: Javier Martinez Canillas @ 2021-04-23 15:51 UTC (permalink / raw)
  To: Daniel Kiper, grub-devel; +Cc: phcoder

On 4/14/21 5:48 PM, Daniel Kiper wrote:
> Additionally, fix the terminfo spelling mistake in
> the GRUB development documentation.
> 
> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

Best regards,
-- 
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement
Red Hat



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2.06 RELEASE 2/3] i18n: Align N_() formatting with the rest of GRUB code
  2021-04-23 15:49   ` Javier Martinez Canillas
@ 2021-04-26 17:27     ` Daniel Kiper
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Kiper @ 2021-04-26 17:27 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: grub-devel, phcoder

On Fri, Apr 23, 2021 at 05:49:49PM +0200, Javier Martinez Canillas wrote:
> On 4/14/21 5:48 PM, Daniel Kiper wrote:
> > Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
> > ---
> >  grub-core/commands/ls.c       |  2 +-
> >  grub-core/commands/terminal.c | 10 +++++-----
> >  2 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/grub-core/commands/ls.c b/grub-core/commands/ls.c
> > index 326d2d6b4..8e98c73cc 100644
> > --- a/grub-core/commands/ls.c
> > +++ b/grub-core/commands/ls.c
> > @@ -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.

> 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 <javierm@redhat.com>

Thanks a lot!

Daniel


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-26 17:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 15:48 [PATCH 2.06 RELEASE 0/3] Various fixes nice to have in the GRUB 2.06 release Daniel Kiper
2021-04-14 15:48 ` [PATCH 2.06 RELEASE 1/3] i18n: Format large integers before the translation message - take 2 Daniel Kiper
2021-04-23 15:42   ` Javier Martinez Canillas
2021-04-14 15:48 ` [PATCH 2.06 RELEASE 2/3] i18n: Align N_() formatting with the rest of GRUB code Daniel Kiper
2021-04-23 15:49   ` Javier Martinez Canillas
2021-04-26 17:27     ` Daniel Kiper
2021-04-14 15:48 ` [PATCH 2.06 RELEASE 3/3] term/terminfo: Fix the terminfo command help and documentation Daniel Kiper
2021-04-23 15:51   ` Javier Martinez Canillas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.