[PATCH v2 07/28] bsd-user: Implement target_to_host_rlim and host_to_target_rlim conversion.

Karim Taha posted 28 patches 1 year, 1 month ago
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>
There is a newer version of this series
[PATCH v2 07/28] bsd-user: Implement target_to_host_rlim and host_to_target_rlim conversion.
Posted by Karim Taha 1 year, 1 month ago
From: Stacey Son <sson@FreeBSD.org>

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
 bsd-user/bsd-proc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/bsd-user/bsd-proc.c b/bsd-user/bsd-proc.c
index 68410a0aa9..19e39a2f76 100644
--- a/bsd-user/bsd-proc.c
+++ b/bsd-user/bsd-proc.c
@@ -38,3 +38,13 @@ int target_to_host_resource(int code)
     return code;
 }
 
+rlim_t target_to_host_rlim(abi_llong target_rlim)
+{
+    return tswap64(target_rlim);
+}
+
+abi_llong host_to_target_rlim(rlim_t rlim)
+{
+    return tswap64(rlim);
+}
+
-- 
2.42.0
Re: [PATCH v2 07/28] bsd-user: Implement target_to_host_rlim and host_to_target_rlim conversion.
Posted by Warner Losh 1 year, 1 month ago
On Sun, Sep 17, 2023 at 10:39 PM Karim Taha <kariem.taha2.7@gmail.com>
wrote:

> From: Stacey Son <sson@FreeBSD.org>
>
> Signed-off-by: Stacey Son <sson@FreeBSD.org>
> Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  bsd-user/bsd-proc.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>

Reviewed-by: Warner Losh <imp@bsdimp.com>


> diff --git a/bsd-user/bsd-proc.c b/bsd-user/bsd-proc.c
> index 68410a0aa9..19e39a2f76 100644
> --- a/bsd-user/bsd-proc.c
> +++ b/bsd-user/bsd-proc.c
> @@ -38,3 +38,13 @@ int target_to_host_resource(int code)
>      return code;
>  }
>
> +rlim_t target_to_host_rlim(abi_llong target_rlim)
> +{
> +    return tswap64(target_rlim);
> +}
> +
> +abi_llong host_to_target_rlim(rlim_t rlim)
> +{
> +    return tswap64(rlim);
> +}
> +
> --
> 2.42.0
>
>