X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fpb-discover.c;h=c494eeb31ba5e595a15b7df387270c6e1d7b1781;hp=f876a3d3f517e98eee2e074042717e96b7c1fd2f;hb=fed2c4da36c2708f2a5a7a09eba61d014b9339d6;hpb=adb11b86f216f26c2301270af4f847f8d7429aef diff --git a/discover/pb-discover.c b/discover/pb-discover.c index f876a3d..c494eeb 100644 --- a/discover/pb-discover.c +++ b/discover/pb-discover.c @@ -7,12 +7,14 @@ #include #include #include +#include #include #include #include #include #include +#include #include "discover-server.h" #include "device-handler.h" @@ -127,6 +129,10 @@ int main(int argc, char *argv[]) struct opts opts; FILE *log; + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + if (opts_parse(&opts, argc, argv)) { print_usage(); return EXIT_FAILURE; @@ -177,6 +183,12 @@ int main(int argc, char *argv[]) if (opts.no_autoboot == opt_yes) config_set_autoboot(false); + if (config_get()->lang) + setlocale(LC_ALL, config_get()->lang); + + if (config_get()->debug) + pb_log_set_debug(true); + system_info_init(server); handler = device_handler_init(server, waitset, opts.dry_run == opt_yes);