[Concept,05/18] sandbox: Move main.h contents into u-boot-sandbox header
Commit Message
From: Simon Glass <sjg@chromium.org>
It isn't really necessary to have a header file for just one function.
This makes it harder to see the full interface provided by sandbox.
Move the sandbox_main() declaration into u-boot-sandbox.h
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/sandbox/cpu/os.c | 2 +-
arch/sandbox/include/asm/main.h | 18 ------------------
arch/sandbox/include/asm/u-boot-sandbox.h | 12 ++++++++++++
3 files changed, 13 insertions(+), 19 deletions(-)
delete mode 100644 arch/sandbox/include/asm/main.h
@@ -30,9 +30,9 @@
#include <asm/fuzzing_engine.h>
#include <asm/getopt.h>
-#include <asm/main.h>
#include <asm/sections.h>
#include <asm/state.h>
+#include <asm/u-boot-sandbox.h>
#include <os.h>
#include <rtc_def.h>
deleted file mode 100644
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (c) 2022 Google, Inc.
- * Written by Andrew Scull <ascull@google.com>
- */
-
-#ifndef __ASM_SANDBOX_MAIN_H
-#define __ASM_SANDBOX_MAIN_H
-
-/**
- * sandbox_main() - main entrypoint for sandbox
- *
- * @argc: the number of arguments passed to the program
- * @argv: array of argc+1 pointers, of which the last one is null
- */
-int sandbox_main(int argc, char *argv[]);
-
-#endif /* __ASM_SANDBOX_MAIN_H */
@@ -41,4 +41,16 @@ void sandbox_reset(void);
/* Exit sandbox (quit U-Boot) */
void __noreturn sandbox_exit(void);
+/**
+ * sandbox_main() - main entrypoint for sandbox
+ *
+ * @argc: the number of arguments passed to the program
+ * @argv: array of argc+1 pointers, of which the last one is null
+
+ * This starts sandbox. It does not return unless something goes wrong.
+ *
+ * Return: 1 on error
+ */
+int sandbox_main(int argc, char *argv[]);
+
#endif /* _U_BOOT_SANDBOX_H_ */