From 6c3d4b56c94761eb9416a70f87c3376163a489f1 Mon Sep 17 00:00:00 2001 From: Alexander Amelkin Date: Tue, 6 Nov 2018 20:43:09 +0300 Subject: [PATCH] Make ipmitool respect system locale settings Dates, times and floating point numbers from now on will be displayed using system locale settings. Resolves ipmitoo/ipmitool#23 Signed-off-by: Alexander Amelkin --- lib/ipmi_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ipmi_main.c b/lib/ipmi_main.c index cb7d01b..d9aa0a1 100644 --- a/lib/ipmi_main.c +++ b/lib/ipmi_main.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -65,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -353,6 +355,9 @@ ipmi_main(int argc, char ** argv, char sol_escape_char = SOL_ESCAPE_CHARACTER_DEFAULT; char * devfile = NULL; + /* Set program locale according to system settings */ + setlocale(LC_ALL, ""); + /* save program name */ progname = strrchr(argv[0], '/'); progname = ((!progname) ? argv[0] : progname+1);