aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light
diff options
context:
space:
mode:
authorAngelo Mantellini <manangel@cisco.com>2019-03-08 17:42:19 +0100
committerAngelo Mantellini <manangel@cisco.com>2019-03-08 17:42:19 +0100
commit0f727c8ee35fffa45bfe1fc4b55892bd4b91fa56 (patch)
tree5cb416b035cd864a2d711c3ebfc844e992d1815a /hicn-light
parent83cb1b630a3b9da5ca92814de1bac4e7f0bdfb71 (diff)
[HICN-104] Correct error in logo on Windows
Change-Id: I16348246b19b84835646afca38b5003d9589d863 Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'hicn-light')
-rw-r--r--hicn-light/src/command_line/controller/hicnLightControl_main.c4
-rw-r--r--hicn-light/src/command_line/daemon/hicnLightDaemon_main.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/hicn-light/src/command_line/controller/hicnLightControl_main.c b/hicn-light/src/command_line/controller/hicnLightControl_main.c
index 3d6f0bdbf..b43789fe5 100644
--- a/hicn-light/src/command_line/controller/hicnLightControl_main.c
+++ b/hicn-light/src/command_line/controller/hicnLightControl_main.c
@@ -103,10 +103,10 @@ static void _printWhite(const char *output) {
HANDLE hConsole = NULL;
WORD currentConsoleAttr;
CONSOLE_SCREEN_BUFFER_INFO csbi;
- SetConsoleTextAttribute(hConsole, 7);
+ hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if (GetConsoleScreenBufferInfo(hConsole, &csbi))
currentConsoleAttr = csbi.wAttributes;
- hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+ SetConsoleTextAttribute(hConsole, 7);
printf("%s", output);
SetConsoleTextAttribute(hConsole, currentConsoleAttr);
#endif
diff --git a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
index 9a6c352fb..39e57ad9e 100644
--- a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
+++ b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
@@ -43,9 +43,9 @@ static void _printRed(const char *output) {
HANDLE hConsole = NULL;
WORD currentConsoleAttr;
CONSOLE_SCREEN_BUFFER_INFO csbi;
+ hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if (GetConsoleScreenBufferInfo(hConsole, &csbi))
currentConsoleAttr = csbi.wAttributes;
- hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, 4);
printf("%s", output);
SetConsoleTextAttribute(hConsole, currentConsoleAttr);
@@ -59,9 +59,9 @@ static void _printWhite(const char *output) {
HANDLE hConsole = NULL;
WORD currentConsoleAttr;
CONSOLE_SCREEN_BUFFER_INFO csbi;
+ hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
if (GetConsoleScreenBufferInfo(hConsole, &csbi))
currentConsoleAttr = csbi.wAttributes;
- hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, 7);
printf("%s", output);
SetConsoleTextAttribute(hConsole, currentConsoleAttr);