mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ratp: move barebox-specific command to ratp_bb.h
@ 2018-01-28 21:30 Aleksander Morgado
  2018-01-30  6:58 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Aleksander Morgado @ 2018-01-28 21:30 UTC (permalink / raw)
  To: barebox; +Cc: Aleksander Morgado

The ratp_run_command() is really an implementation detail of the
barebox ratp 'command' operation support. Move it to the barebox
specific header and rename it with the correct prefix.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
---
 common/ratp.c     | 2 +-
 include/ratp.h    | 2 --
 include/ratp_bb.h | 7 ++++---
 lib/readline.c    | 4 ++--
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/common/ratp.c b/common/ratp.c
index c5eae2e2c..6db4df870 100644
--- a/common/ratp.c
+++ b/common/ratp.c
@@ -323,7 +323,7 @@ static int ratp_console_register(struct ratp_ctx *ctx)
 	return 0;
 }
 
-void ratp_run_command(void)
+void barebox_ratp_command_run(void)
 {
 	int ret;
 
diff --git a/include/ratp.h b/include/ratp.h
index 94fd004f4..6f4cf8a6f 100644
--- a/include/ratp.h
+++ b/include/ratp.h
@@ -17,6 +17,4 @@ int ratp_poll(struct ratp *ratp);
 bool ratp_closed(struct ratp *ratp);
 bool ratp_busy(struct ratp *ratp);
 
-void ratp_run_command(void);
-
 #endif /* __RATP_H */
\ No newline at end of file
diff --git a/include/ratp_bb.h b/include/ratp_bb.h
index 52ecaff37..70fd58a67 100644
--- a/include/ratp_bb.h
+++ b/include/ratp_bb.h
@@ -8,8 +8,9 @@ struct ratp_bb_pkt {
 	uint8_t data[];
 };
 
-int barebox_ratp(struct console_device *cdev);
-int barebox_ratp_fs_call(struct ratp_bb_pkt *tx, struct ratp_bb_pkt **rx);
-int barebox_ratp_fs_mount(const char *path);
+int  barebox_ratp(struct console_device *cdev);
+void barebox_ratp_command_run(void);
+int  barebox_ratp_fs_call(struct ratp_bb_pkt *tx, struct ratp_bb_pkt **rx);
+int  barebox_ratp_fs_mount(const char *path);
 
 #endif /* __RATP_BB_H */
diff --git a/lib/readline.c b/lib/readline.c
index b5d99ca18..1e380abec 100644
--- a/lib/readline.c
+++ b/lib/readline.c
@@ -3,7 +3,7 @@
 #include <init.h>
 #include <libbb.h>
 #include <poller.h>
-#include <ratp.h>
+#include <ratp_bb.h>
 #include <xfuncs.h>
 #include <complete.h>
 #include <linux/ctype.h>
@@ -203,7 +203,7 @@ int readline(const char *prompt, char *buf, int len)
 		while (!tstc()) {
 			poller_call();
 			if (IS_ENABLED(CONFIG_RATP))
-				ratp_run_command();
+				barebox_ratp_command_run();
 		}
 
 		ichar = read_key();
-- 
2.15.1


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ratp: move barebox-specific command to ratp_bb.h
  2018-01-28 21:30 [PATCH] ratp: move barebox-specific command to ratp_bb.h Aleksander Morgado
@ 2018-01-30  6:58 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2018-01-30  6:58 UTC (permalink / raw)
  To: Aleksander Morgado; +Cc: barebox

On Sun, Jan 28, 2018 at 10:30:23PM +0100, Aleksander Morgado wrote:
> The ratp_run_command() is really an implementation detail of the
> barebox ratp 'command' operation support. Move it to the barebox
> specific header and rename it with the correct prefix.
> 
> Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
> ---
>  common/ratp.c     | 2 +-
>  include/ratp.h    | 2 --
>  include/ratp_bb.h | 7 ++++---
>  lib/readline.c    | 4 ++--
>  4 files changed, 7 insertions(+), 8 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/common/ratp.c b/common/ratp.c
> index c5eae2e2c..6db4df870 100644
> --- a/common/ratp.c
> +++ b/common/ratp.c
> @@ -323,7 +323,7 @@ static int ratp_console_register(struct ratp_ctx *ctx)
>  	return 0;
>  }
>  
> -void ratp_run_command(void)
> +void barebox_ratp_command_run(void)
>  {
>  	int ret;
>  
> diff --git a/include/ratp.h b/include/ratp.h
> index 94fd004f4..6f4cf8a6f 100644
> --- a/include/ratp.h
> +++ b/include/ratp.h
> @@ -17,6 +17,4 @@ int ratp_poll(struct ratp *ratp);
>  bool ratp_closed(struct ratp *ratp);
>  bool ratp_busy(struct ratp *ratp);
>  
> -void ratp_run_command(void);
> -
>  #endif /* __RATP_H */
> \ No newline at end of file
> diff --git a/include/ratp_bb.h b/include/ratp_bb.h
> index 52ecaff37..70fd58a67 100644
> --- a/include/ratp_bb.h
> +++ b/include/ratp_bb.h
> @@ -8,8 +8,9 @@ struct ratp_bb_pkt {
>  	uint8_t data[];
>  };
>  
> -int barebox_ratp(struct console_device *cdev);
> -int barebox_ratp_fs_call(struct ratp_bb_pkt *tx, struct ratp_bb_pkt **rx);
> -int barebox_ratp_fs_mount(const char *path);
> +int  barebox_ratp(struct console_device *cdev);
> +void barebox_ratp_command_run(void);
> +int  barebox_ratp_fs_call(struct ratp_bb_pkt *tx, struct ratp_bb_pkt **rx);
> +int  barebox_ratp_fs_mount(const char *path);
>  
>  #endif /* __RATP_BB_H */
> diff --git a/lib/readline.c b/lib/readline.c
> index b5d99ca18..1e380abec 100644
> --- a/lib/readline.c
> +++ b/lib/readline.c
> @@ -3,7 +3,7 @@
>  #include <init.h>
>  #include <libbb.h>
>  #include <poller.h>
> -#include <ratp.h>
> +#include <ratp_bb.h>
>  #include <xfuncs.h>
>  #include <complete.h>
>  #include <linux/ctype.h>
> @@ -203,7 +203,7 @@ int readline(const char *prompt, char *buf, int len)
>  		while (!tstc()) {
>  			poller_call();
>  			if (IS_ENABLED(CONFIG_RATP))
> -				ratp_run_command();
> +				barebox_ratp_command_run();
>  		}
>  
>  		ichar = read_key();
> -- 
> 2.15.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-30  6:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-28 21:30 [PATCH] ratp: move barebox-specific command to ratp_bb.h Aleksander Morgado
2018-01-30  6:58 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox