Change in osmo-ccid-firmware[master]: command.c: Print prompt when starting up

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Apr 16 19:20:37 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13670 )

Change subject: command.c: Print prompt when starting up
......................................................................

command.c: Print prompt when starting up

Change-Id: I18e4351609ab10c06a2fa197cb9f7a66269799a0
---
M sysmoOCTSIM/command.c
M sysmoOCTSIM/command.h
M sysmoOCTSIM/main.c
3 files changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/sysmoOCTSIM/command.c b/sysmoOCTSIM/command.c
index 9502f05..3210b27 100644
--- a/sysmoOCTSIM/command.c
+++ b/sysmoOCTSIM/command.c
@@ -71,6 +71,11 @@
 	g_cmds.buf[g_cmds.buf_idx++] = c;
 }
 
+void command_print_prompt(void)
+{
+	printf(g_cmds.prompt);
+}
+
 void command_try_recv(void)
 {
 	unsigned int i = 0;
diff --git a/sysmoOCTSIM/command.h b/sysmoOCTSIM/command.h
index cdf256d..5d022dc 100644
--- a/sysmoOCTSIM/command.h
+++ b/sysmoOCTSIM/command.h
@@ -18,3 +18,4 @@
 void command_init(const char *prompt);
 int command_register(const struct command_fn *cmd);
 void command_try_recv(void);
+void command_print_prompt(void);
diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c
index 9dee504..93b90db 100644
--- a/sysmoOCTSIM/main.c
+++ b/sysmoOCTSIM/main.c
@@ -232,6 +232,8 @@
 	command_register(&cmd_sim_led);
 
 	printf("\r\n\r\nsysmocom sysmoOCTSIM\r\n");
+
+	command_print_prompt();
 	while (true) { // main loop
 		command_try_recv();
 	}

-- 
To view, visit https://gerrit.osmocom.org/13670
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I18e4351609ab10c06a2fa197cb9f7a66269799a0
Gerrit-Change-Number: 13670
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190416/6a772b15/attachment.htm>


More information about the gerrit-log mailing list