Re: [PATCH] osdep/hurd/getroot: Fix 64bit build

2024-01-20 Thread Vladimir 'phcoder' Serbinenko
LGTM
Reviewed-by: Vladimir Serbinenko

Le sam. 20 janv. 2024, 21:36, Samuel Thibault 
a écrit :

> file_get_fs_options takes a mach_msg_type_number_t (32bit), not a size_t
> (64bit on 64bit platforms).
> ---
>  grub-core/osdep/hurd/getroot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/grub-core/osdep/hurd/getroot.c
> b/grub-core/osdep/hurd/getroot.c
> index 0efefdab4..b849700e6 100644
> --- a/grub-core/osdep/hurd/getroot.c
> +++ b/grub-core/osdep/hurd/getroot.c
> @@ -58,7 +58,7 @@ grub_util_find_hurd_root_device (const char *path)
>file_t file;
>error_t err;
>char *argz = NULL, *name = NULL, *ret;
> -  size_t argz_len = 0;
> +  mach_msg_type_number_t argz_len = 0;
>int i;
>
>file = file_name_lookup (path, 0, 0);
> --
> 2.43.0
>
>
> ___
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] osdep/hurd/getroot: Fix 64bit build

2024-01-20 Thread John Paul Adrian Glaubitz
On Sat, 2024-01-20 at 19:35 +0100, Samuel Thibault wrote:
> file_get_fs_options takes a mach_msg_type_number_t (32bit), not a size_t
> (64bit on 64bit platforms).

Nitpick: I think it should be "32 bit", "64 bit" and "64-bit", the former
two referring two a word size while the latter refers to the target type.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] hurd: Find proper ld.so on 64bit systems

2024-01-20 Thread Samuel Thibault
Signed-off-by: Samuel Thibault 

Samuel Thibault, le sam. 20 janv. 2024 21:10:14 +0100, a ecrit:
> ---
>  util/grub.d/10_hurd.in | 11 +--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
> index 7d1e46391..f9c394ecb 100644
> --- a/util/grub.d/10_hurd.in
> +++ b/util/grub.d/10_hurd.in
> @@ -91,7 +91,14 @@ if ${at_least_one} ; then : ; else
>exit 0
>  fi
>  
> -if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else
> +if test -e '/lib/ld.so.1' ; then
> +  LD_SO=/lib/ld.so.1
> +fi
> +if test -e '/lib/ld-x86-64.so.1' ; then
> +  LD_SO=/lib/ld-x86-64.so.1
> +fi
> +
> +if ${all_of_them} && test -n "$LD_SO" ; then : ; else
>gettext "Some Hurd stuff found, but not enough to boot." >&2
>echo >&2
>exit 1
> @@ -210,7 +217,7 @@ EOF
>   $host_ports \\
>   --exec-server-task='\${exec-task}' -T typed '\${root}' 
> \\
>   '\$(fs-task=task-create)' $resume_task
> - module  /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)'
> + module  $LD_SO exec /hurd/exec '\$(exec-task=task-create)'
>  }
>  EOF
>  
> -- 
> 2.43.0
> 

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] osdep/hurd/getroot: Fix 64bit build

2024-01-20 Thread Samuel Thibault
Samuel Thibault, le sam. 20 janv. 2024 19:35:13 +0100, a ecrit:
> file_get_fs_options takes a mach_msg_type_number_t (32bit), not a size_t
> (64bit on 64bit platforms).

Signed-off-by: Samuel Thibault 

> ---
>  grub-core/osdep/hurd/getroot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/grub-core/osdep/hurd/getroot.c b/grub-core/osdep/hurd/getroot.c
> index 0efefdab4..b849700e6 100644
> --- a/grub-core/osdep/hurd/getroot.c
> +++ b/grub-core/osdep/hurd/getroot.c
> @@ -58,7 +58,7 @@ grub_util_find_hurd_root_device (const char *path)
>file_t file;
>error_t err;
>char *argz = NULL, *name = NULL, *ret;
> -  size_t argz_len = 0;
> +  mach_msg_type_number_t argz_len = 0;
>int i;
>  
>file = file_name_lookup (path, 0, 0);
> -- 
> 2.43.0
> 

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


[PATCH] hurd: Find proper ld.so on 64bit systems

2024-01-20 Thread Samuel Thibault
---
 util/grub.d/10_hurd.in | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
index 7d1e46391..f9c394ecb 100644
--- a/util/grub.d/10_hurd.in
+++ b/util/grub.d/10_hurd.in
@@ -91,7 +91,14 @@ if ${at_least_one} ; then : ; else
   exit 0
 fi
 
-if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else
+if test -e '/lib/ld.so.1' ; then
+  LD_SO=/lib/ld.so.1
+fi
+if test -e '/lib/ld-x86-64.so.1' ; then
+  LD_SO=/lib/ld-x86-64.so.1
+fi
+
+if ${all_of_them} && test -n "$LD_SO" ; then : ; else
   gettext "Some Hurd stuff found, but not enough to boot." >&2
   echo >&2
   exit 1
@@ -210,7 +217,7 @@ EOF
$host_ports \\
--exec-server-task='\${exec-task}' -T typed '\${root}' 
\\
'\$(fs-task=task-create)' $resume_task
-   module  /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)'
+   module  $LD_SO exec /hurd/exec '\$(exec-task=task-create)'
 }
 EOF
 
-- 
2.43.0


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


[PATCH] osdep/hurd/getroot: Fix 64bit build

2024-01-20 Thread Samuel Thibault
file_get_fs_options takes a mach_msg_type_number_t (32bit), not a size_t
(64bit on 64bit platforms).
---
 grub-core/osdep/hurd/getroot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/osdep/hurd/getroot.c b/grub-core/osdep/hurd/getroot.c
index 0efefdab4..b849700e6 100644
--- a/grub-core/osdep/hurd/getroot.c
+++ b/grub-core/osdep/hurd/getroot.c
@@ -58,7 +58,7 @@ grub_util_find_hurd_root_device (const char *path)
   file_t file;
   error_t err;
   char *argz = NULL, *name = NULL, *ret;
-  size_t argz_len = 0;
+  mach_msg_type_number_t argz_len = 0;
   int i;
 
   file = file_name_lookup (path, 0, 0);
-- 
2.43.0


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel