[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/18] kern/boot_script.c: move struct definitions to a header fi
From: |
Marin Ramesa |
Subject: |
[PATCH 08/18] kern/boot_script.c: move struct definitions to a header file |
Date: |
Fri, 6 Dec 2013 16:29:50 +0100 |
* kern/boot_script.c (sym, arg): Move struct definitions to kern/boot_script.h.
---
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
- [PATCH 01/18] ddb/db_output.c: remove forward declaration, Marin Ramesa, 2013/12/06
- [PATCH 04/18] i386/i386at/pic_isa.c: remove forward declaration, Marin Ramesa, 2013/12/06
- [PATCH 03/18] i386/i386at/model_dep.c: fix argument list, Marin Ramesa, 2013/12/06
- [PATCH 05/18] vm/vm_pageout.c: remove forward declarations, Marin Ramesa, 2013/12/06
- [PATCH 06/18] vm/vm_object.c: remove unused variable, Marin Ramesa, 2013/12/06
- [PATCH 07/18] vm/vm_map.c: use boolean instead of an int, Marin Ramesa, 2013/12/06
- [PATCH 02/18] i386/i386at/lpr.c: fix argument list, Marin Ramesa, 2013/12/06
- [PATCH 08/18] kern/boot_script.c: move struct definitions to a header file,
Marin Ramesa <=
- [PATCH 09/18] kern/bootstrap.c: move struct definition to a header file, Marin Ramesa, 2013/12/06
- [PATCH 10/18] kern/startup.c: use boolean values, Marin Ramesa, 2013/12/06
- [PATCH 12/18] kern/debug.c: fix implicit declaration of function, Marin Ramesa, 2013/12/06
- [PATCH 11/18] kern/exception.c: move struct definition to a header file, Marin Ramesa, 2013/12/06
- [PATCH 14/18] Fix initialization from incompatible pointer type, Marin Ramesa, 2013/12/06