From a032b25832a75deef7d6d8b48a0786e5838df419 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Tue, 12 Sep 2023 17:26:35 +0200 Subject: irmd: Print ascii Ouroboros logo at startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The IRMd will now print a stylized logo at startup: ▄▄█████▄▄▄ ▄█▀▀ ▀▀███▄ █ ██ ▄▄▄ ▄███▄ ▄ ▄ ▄ ▄▄ ▄▄ █ ▄▄ ▄▄ ▄ ▄▄ ▄▄ ▄▄ ██ █ █ █████ █ █ █▀ ▀ █ █ █▀ █ █ █ █▀ ▀ █ █ ▀▄ ▀ ██ ▀▄▄▄▀ ▀█▀ █ █ █ █ █ █▄ █ █ █ █ █ █ ▄ ▀▄ █▄ █ ▀▀▀ ▀ ▀ ▀▀ ▀ ▀▀ ▀▀ ▀ ▀▀ ▀▀ ▀█▄▄▄▄▄▄▄▄▀ ▀▀▀▀▀▀ All credits to Zen for providing the ASCII art! Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/irmd/config.h.in | 29 +++++++++++++++++++++++++++++ src/irmd/main.c | 6 +++++- 2 files changed, 34 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/irmd/config.h.in b/src/irmd/config.h.in index 575d3123..97439d68 100644 --- a/src/irmd/config.h.in +++ b/src/irmd/config.h.in @@ -61,3 +61,32 @@ #endif #cmakedefine HAVE_LIBGCRYPT + +#define O7S_ASCII_ART \ +"\n" \ +" ▄▄█████▄▄▄\n" \ +" ▄█▀▀ ▀▀███▄ " \ +"█\n" \ +" ██ ▄▄▄ ▄███▄ " \ +"▄ ▄ ▄ ▄▄" \ +" ▄▄ █ ▄▄ " \ +" ▄▄ ▄ ▄▄ " \ +"▄▄ ▄▄\n" \ +" ██ █ █ " \ +"[38;5;4m█████ █ █ " \ +"█▀ ▀ █ █" \ +" █▀ █ █ " \ +"█ █▀ ▀ █" \ +" █ ▀▄ ▀\n" \ +" ██ ▀▄▄▄▀ ▀█▀ " \ +"█ █ █ " \ +"█ █ █▄ █ " \ +"█ █ █ █" \ +" █ ▄ ▀▄\n" \ +" █▄ █ ▀▀▀" \ +" ▀ ▀ ▀▀" \ +" ▀ ▀▀ ▀▀ " \ +"▀ ▀▀ ▀▀\n" \ +" ▀█▄▄▄▄▄▄▄▄▀\n" \ +" ▀▀▀▀▀▀\n" \ +"\n" diff --git a/src/irmd/main.c b/src/irmd/main.c index b5184ade..6073db46 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -1599,7 +1599,7 @@ static int flow_alloc(pid_t pid, IPCP_HASH_LEN(ipcp), qs, *data)) { reg_flow_set_state(f, FLOW_NULL); /* sanitizer cleans this */ - log_info("Flow_allocation failed."); + log_warn("Flow_allocation %d failed.", flow_id); free(hash); return -EAGAIN; } @@ -1820,6 +1820,7 @@ static int flow_req_arr(pid_t pid, flow_id = bmp_allocate(irmd.flow_ids); if (!bmp_is_id_valid(irmd.flow_ids, flow_id)) { + log_err("Out of flow ids."); pthread_rwlock_unlock(&irmd.flows_lock); return -1; } @@ -2756,6 +2757,9 @@ int main(int argc, irm_argparse(argc, argv); + if (irmd.log_stdout) + printf(O7S_ASCII_ART); + if (geteuid() != 0) { printf("IPC Resource Manager must be run as root.\n"); exit(EXIT_FAILURE); -- cgit v1.2.3