bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 08/18] kern/boot_script.c: move struct definitions to a heade


From: Samuel Thibault
Subject: Re: [PATCH 08/18] kern/boot_script.c: move struct definitions to a header file
Date: Mon, 9 Dec 2013 00:35:27 +0900
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Marin Ramesa, le Fri 06 Dec 2013 16:29:50 +0100, a écrit :
> * kern/boot_script.c (sym, arg): Move struct definitions to 
> kern/boot_script.h.

Ditto.

> ---
>  kern/boot_script.c | 41 -----------------------------------------
>  kern/boot_script.h | 39 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 39 insertions(+), 41 deletions(-)
> 
> diff --git a/kern/boot_script.c b/kern/boot_script.c
> index b2e9393..92dd55c 100644
> --- a/kern/boot_script.c
> +++ b/kern/boot_script.c
> @@ -6,47 +6,6 @@
>  #include <string.h>
>  #include "boot_script.h"
>  
> -
> -/* This structure describes a symbol.  */
> -struct sym
> -{
> -  /* Symbol name.  */
> -  const char *name;
> -
> -  /* Type of value returned by function.  */
> -  int type;
> -
> -  /* Symbol value.  */
> -  long val;
> -
> -  /* For function symbols; type of value returned by function.  */
> -  int ret_type;
> -
> -  /* For function symbols; if set, execute function at the time
> -     of command execution, not during parsing.  A function with
> -     this field set must also have `no_arg' set.  Also, the function's
> -     `val' argument will always be NULL.  */
> -  int run_on_exec;
> -};
> -
> -/* Additional values symbols can take.
> -   These are only used internally.  */
> -#define VAL_SYM              10      /* symbol table entry */
> -#define VAL_FUNC     11      /* function pointer */
> -
> -/* This structure describes an argument.  */
> -struct arg
> -{
> -  /* Argument text copied verbatim.  0 if none.  */
> -  char *text;
> -
> -  /* Type of value assigned.  0 if none.  */
> -  int type;
> -
> -  /* Argument value.  */
> -  long val;
> -};
> -
>  /* List of commands.  */
>  static struct cmd **cmds = 0;
>  
> diff --git a/kern/boot_script.h b/kern/boot_script.h
> index c5ad673..069f5c5 100644
> --- a/kern/boot_script.h
> +++ b/kern/boot_script.h
> @@ -54,6 +54,45 @@ struct cmd
>    int exec_funcs_index;
>  };
>  
> +/* This structure describes a symbol.  */
> +struct sym
> +{
> +  /* Symbol name.  */
> +  const char *name;
> +
> +  /* Type of value returned by function.  */
> +  int type;
> +
> +  /* Symbol value.  */
> +  long val;
> +
> +  /* For function symbols; type of value returned by function.  */
> +  int ret_type;
> +
> +  /* For function symbols; if set, execute function at the time
> +     of command execution, not during parsing.  A function with
> +     this field set must also have `no_arg' set.  Also, the function's
> +     `val' argument will always be NULL.  */
> +  int run_on_exec;
> +};
> +
> +/* Additional values symbols can take.
> +   These are only used internally.  */
> +#define VAL_SYM              10      /* symbol table entry */
> +#define VAL_FUNC     11      /* function pointer */
> +
> +/* This structure describes an argument.  */
> +struct arg
> +{
> +  /* Argument text copied verbatim.  0 if none.  */
> +  char *text;
> +
> +  /* Type of value assigned.  0 if none.  */
> +  int type;
> +
> +  /* Argument value.  */
> +  long val;
> +};
>  
>  /* The user must define these functions, we work like malloc and free.  */
>  void *boot_script_malloc (unsigned int);
> -- 
> 1.8.1.4
> 
> 

-- 
Samuel
 Cliquez sur le lien qui suit dans ce mail...vous n'avez plus qu'a vous
 inscrire pour gagner de l'argent en restant connecte....et puis faites
 passer le message et vous gagnerez encore plus d'argent ...
 -+- AC in NPC : Neuneu a rencontré le Pere Noël -+-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]