[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH gnumach] Remove host_get_boot_info and host_get_kernel_boot_i
From: |
Samuel Thibault |
Subject: |
Re: [PATCH gnumach] Remove host_get_boot_info and host_get_kernel_boot_info since they are not used. |
Date: |
Fri, 7 Apr 2023 00:45:12 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Applied, thanks!
Flavio Cruz, le jeu. 06 avril 2023 01:04:15 -0400, a ecrit:
> host_get_kernel_boot_info was added recently to fix the use of
> MACH_MSG_TYPE_STRING.
> ---
> doc/mach.texi | 14 --------------
> include/mach/host_info.h | 3 ---
> include/mach/mach_host.defs | 16 ++--------------
> include/mach/mach_types.defs | 4 ----
> kern/machine.c | 23 -----------------------
> 5 files changed, 2 insertions(+), 58 deletions(-)
>
> diff --git a/doc/mach.texi b/doc/mach.texi
> index fdc36d45..7eb5baa1 100644
> --- a/doc/mach.texi
> +++ b/doc/mach.texi
> @@ -5595,20 +5595,6 @@ inaccessible memory, it returns
> @code{KERN_INVALID_ADDRESS}, and
> @code{KERN_SUCCESS} otherwise.
> @end deftypefun
>
> -@deftypefun kern_return_t host_get_kernel_boot_info (@w{host_priv_t
> @var{host_priv}}, @w{kernel_boot_info_t @var{boot_info}})
> -The @code{host_get_kernel_boot_info} function returns the boot-time
> information
> -string supplied by the operator to the kernel executing on
> -@var{host_priv} in the character string @var{boot_info}. The constant
> -@code{KERNEL_BOOT_INFO_MAX} should be used to dimension storage for the
> -returned string if the @code{kernel_boot_info_t} declaration is not
> -used.
> -
> -If the boot-time information string supplied by the operator is longer
> -than @code{KERNEL_BOOT_INFO_MAX}, the result is truncated and not
> -necessarily null-terminated.
> -@end deftypefun
> -
> -
> @node Host Time
> @section Host Time
>
> diff --git a/include/mach/host_info.h b/include/mach/host_info.h
> index 82f3faac..b84376b8 100644
> --- a/include/mach/host_info.h
> +++ b/include/mach/host_info.h
> @@ -46,9 +46,6 @@ typedef integer_t host_info_data_t[HOST_INFO_MAX];
> #define KERNEL_VERSION_MAX (512)
> typedef char kernel_version_t[KERNEL_VERSION_MAX];
>
> -#define KERNEL_BOOT_INFO_MAX (4096)
> -typedef char kernel_boot_info_t[KERNEL_BOOT_INFO_MAX];
> -
> /*
> * Currently defined information.
> */
> diff --git a/include/mach/mach_host.defs b/include/mach/mach_host.defs
> index 99b48b4b..90581cff 100644
> --- a/include/mach/mach_host.defs
> +++ b/include/mach/mach_host.defs
> @@ -347,13 +347,8 @@ routine processor_control(
> processor : processor_t;
> processor_cmd : processor_info_t);
>
> -/*
> - * Get boot configuration information from kernel.
> - * Deprecated, use host_get_kernel_boot_info.
> - */
> -routine host_get_boot_info(
> - host_priv : host_priv_t;
> - out boot_info : kernel_boot_info_t);
> +/* host_get_boot_info */
> +skip;
>
> /*
> * Get the time on this host.
> @@ -387,10 +382,3 @@ routine host_adjust_time64(
> routine host_get_kernel_version(
> host : host_t;
> out kernel_version : new_kernel_version_t);
> -
> -/*
> - * Get boot configuration information from kernel.
> - */
> -routine host_get_kernel_boot_info(
> - host_priv : host_priv_t;
> - out boot_info : new_kernel_boot_info_t);
> diff --git a/include/mach/mach_types.defs b/include/mach/mach_types.defs
> index e02e3e8a..74196018 100644
> --- a/include/mach/mach_types.defs
> +++ b/include/mach/mach_types.defs
> @@ -259,10 +259,6 @@ type kernel_version_t =
> (MACH_MSG_TYPE_STRING, 512*8);
> type new_kernel_version_t = c_string[512]
> ctype: kernel_version_t;
>
> -type kernel_boot_info_t = (MACH_MSG_TYPE_STRING, 4096*8);
> -type new_kernel_boot_info_t = c_string[4096]
> - ctype: kernel_boot_info_t;
> -
> type rpc_time_value_t = struct {
> rpc_long_integer_t seconds;
> integer_t microseconds;
> diff --git a/kern/machine.c b/kern/machine.c
> index c9e368a0..0aa0f3c6 100644
> --- a/kern/machine.c
> +++ b/kern/machine.c
> @@ -659,26 +659,3 @@ processor_assign(
> }
>
> #endif /* NCPUS > 1 */
> -
> -kern_return_t
> -host_get_boot_info(
> - host_t priv_host,
> - kernel_boot_info_t boot_info)
> -{
> - char *src = "";
> -
> - if (priv_host == HOST_NULL) {
> - return KERN_INVALID_HOST;
> - }
> -
> - (void) strncpy(boot_info, src, KERNEL_BOOT_INFO_MAX);
> - return KERN_SUCCESS;
> -}
> -
> -kern_return_t
> -host_get_kernel_boot_info(
> - host_t priv_host,
> - kernel_boot_info_t boot_info)
> -{
> - return host_get_boot_info(priv_host, boot_info);
> -}
> --
> 2.39.2
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.