mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 03/14] include: move shell prototypes to shell.h
Date: Tue, 19 Apr 2016 09:36:41 +0200	[thread overview]
Message-ID: <1461051412-25711-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1461051412-25711-1-git-send-email-s.hauer@pengutronix.de>

We have a shell,h, so move shell specific prototypes there.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/menutree.c |  1 +
 common/startup.c  |  1 +
 include/common.h  | 11 -----------
 include/shell.h   | 11 +++++++++++
 4 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/common/menutree.c b/common/menutree.c
index 160ba9a..1505ec8 100644
--- a/common/menutree.c
+++ b/common/menutree.c
@@ -16,6 +16,7 @@
 #include <glob.h>
 #include <menu.h>
 #include <fs.h>
+#include <shell.h>
 #include <libfile.h>
 
 #include <linux/stat.h>
diff --git a/common/startup.c b/common/startup.c
index 093a23b..432be67 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -30,6 +30,7 @@
  * @brief Main entry into the C part of barebox
  */
 #include <common.h>
+#include <shell.h>
 #include <init.h>
 #include <command.h>
 #include <malloc.h>
diff --git a/include/common.h b/include/common.h
index cab98d6..ea349be 100644
--- a/include/common.h
+++ b/include/common.h
@@ -102,17 +102,6 @@ extern int (*barebox_main)(void);
 void __noreturn start_barebox(void);
 void shutdown_barebox(void);
 
-int run_shell(void);
-
-#ifdef CONFIG_SHELL_HUSH
-char *shell_expand(char *str);
-#else
-static inline char *shell_expand(char *str)
-{
-	return strdup(str);
-}
-#endif
-
 #define ALIGN_DOWN(x, a)	((x) & ~((typeof(x))(a) - 1))
 
 #define ARRAY_AND_SIZE(x)	(x), ARRAY_SIZE(x)
diff --git a/include/shell.h b/include/shell.h
index b98cac3..65dad0e 100644
--- a/include/shell.h
+++ b/include/shell.h
@@ -9,4 +9,15 @@
 
 int shell_get_last_return_code(void);
 
+int run_shell(void);
+
+#ifdef CONFIG_SHELL_HUSH
+char *shell_expand(char *str);
+#else
+static inline char *shell_expand(char *str)
+{
+	return strdup(str);
+}
+#endif
+
 #endif /* __SHELL_H__ */
-- 
2.7.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2016-04-19  7:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19  7:36 include/prototype cleanup Sascha Hauer
2016-04-19  7:36 ` [PATCH 01/14] include: move run_command prototype to command.h Sascha Hauer
2016-04-19  7:36 ` [PATCH 02/14] include/common.h: remove unused struct memarea_info Sascha Hauer
2016-04-19  7:36 ` Sascha Hauer [this message]
2016-04-19  7:36 ` [PATCH 04/14] include: move crc specific stuff to crc.h Sascha Hauer
2016-04-19  7:36 ` [PATCH 05/14] libfile: move open_and_lseek() to libfile Sascha Hauer
2016-04-19  7:36 ` [PATCH 06/14] show_progress: print spaces with %*s Sascha Hauer
2016-04-19  7:36 ` [PATCH 07/14] string: Fix (v)asprintf prototypes Sascha Hauer
2016-04-19  7:36 ` [PATCH 08/14] move make_directory declaration to libfile.h Sascha Hauer
2016-04-19  7:36 ` [PATCH 09/14] move unlink_recursive " Sascha Hauer
2016-04-19  7:36 ` [PATCH 10/14] fs: move libc function prototypes to their correct locations Sascha Hauer
2016-04-19  7:36 ` [PATCH 11/14] stdio: rename getc to getchar Sascha Hauer
2016-04-19  7:36 ` [PATCH 12/14] stdio: replace fprintf(stderr,...) with eprintf Sascha Hauer
2016-04-19  7:36 ` [PATCH 13/14] stdio: Replace FILE functions with filedescriptor functions Sascha Hauer
2016-04-19  7:36 ` [PATCH 14/14] stdio: Whitespace cleanup Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461051412-25711-4-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox