From 409bcdc9957e312f4c049225e04deb2209c7fb7d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Mon, 30 Apr 2012 07:41:06 +0000 Subject: [PATCH] improved messges --- src/lib/amd.c | 12 ++++-------- src/lib/hdd_atasmart.c | 3 ++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/lib/amd.c b/src/lib/amd.c index e7befe5..b806736 100644 --- a/src/lib/amd.c +++ b/src/lib/amd.c @@ -147,8 +147,7 @@ static int init() hdll = dlopen("libatiadlxx.so", RTLD_LAZY|RTLD_GLOBAL); if (!hdll) { - fprintf(stderr, - _("ERROR: ADL library not found!\n")); + log_err(_("AMD: cannot found ADL library.")); return 0; } @@ -172,8 +171,7 @@ static int init() !adl_adapter_adapterinfo_get || !adl_overdrive5_temperature_get || !adl_overdrive5_fanspeed_get) { - fprintf(stderr, - _("ERROR: ADL's API is missing!\n")); + log_err(_("AMD: missing ADL's API.")); return 0; } @@ -181,16 +179,14 @@ static int init() retrieve adapter information only for adapters that are physically present and enabled in the system */ if (ADL_OK != adl_main_control_create(adl_main_memory_alloc, 1)) { - fprintf(stderr, - _("ERROR: ADL Initialization Error!\n")); + log_err(_("AMD: failed to initialize ADL.")); return 0; } adl_main_control_done = 1; /* Obtain the number of adapters for the system */ if (ADL_OK != adl_adapter_numberofadapters_get(&inumberadapters)) { - fprintf(stderr, - _("ERROR: Cannot get the number of adapters!\n")); + log_err(_("AMD: cannot get the number of adapters.")); return 0; } diff --git a/src/lib/hdd_atasmart.c b/src/lib/hdd_atasmart.c index 6d0fab9..3943fa3 100644 --- a/src/lib/hdd_atasmart.c +++ b/src/lib/hdd_atasmart.c @@ -141,7 +141,8 @@ struct psensor **hdd_psensor_list_add(struct psensor **sensors, result = tmp_sensors; } else { - log_err("sk_disk_open(hdd_atasmart) %s failure", *tmp); + log_err(_("atasmart: sk_disk_open() failure: %s."), + *tmp); analyze_disk(*tmp); } -- 2.7.4