From 550acad584dc29c81e943d6efad93d07ae88cc8f Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 3 Jul 2015 13:13:09 +0200 Subject: [PATCH 137/257] libstand: Show a message instead of the boring twiddle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Obviously the message should be sysctl controlled, but for now it's just a hardcoded 'Die Ärzte' reference which may contain traces of electro beer. Obtained from: ElectroBSD --- lib/libstand/twiddle.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libstand/twiddle.c b/lib/libstand/twiddle.c index 96ebbbec43c0..b8c1117ea217 100644 --- a/lib/libstand/twiddle.c +++ b/lib/libstand/twiddle.c @@ -48,6 +48,7 @@ void twiddle(u_int callerdiv) { static u_int callercnt, globalcnt, pos; + static const char message[] = "5,6,7,8 - Bullenstaat!"; callercnt++; if (callerdiv > 1 && (callercnt % callerdiv) != 0) @@ -57,8 +58,9 @@ twiddle(u_int callerdiv) if (globaldiv > 1 && (globalcnt % globaldiv) != 0) return; - putchar("|/-\\"[pos++ & 3]); - putchar('\b'); + putchar((pos < sizeof(message)) ? message[pos] : '\b'); + pos++; + pos = pos % sizeof(message); } void -- 2.11.0