diff mbox

lib: olog: Improve message when sudo usage may help

Message ID 1467921925-29901-1-git-send-email-debmc@linux.vnet.ibm.com
State Accepted
Headers show

Commit Message

Deb McLemore July 7, 2016, 8:05 p.m. UTC
When using non-root user file handling issues may prohibit
proper olog authority.  Improve the message to suggest
using sudo as a possible solution.

Signed-off-by: Deb McLemore <debmc@linux.vnet.ibm.com>
---
 src/kernel/olog/olog.c  | 5 ++++-
 src/lib/src/fwts_olog.c | 7 ++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

Comments

Colin Ian King July 7, 2016, 8:57 p.m. UTC | #1
On 07/07/16 21:05, Deb McLemore wrote:
> When using non-root user file handling issues may prohibit
> proper olog authority.  Improve the message to suggest
> using sudo as a possible solution.
> 
> Signed-off-by: Deb McLemore <debmc@linux.vnet.ibm.com>
> ---
>  src/kernel/olog/olog.c  | 5 ++++-
>  src/lib/src/fwts_olog.c | 7 ++++---
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/src/kernel/olog/olog.c b/src/kernel/olog/olog.c
> index d8487f0..bb65279 100644
> --- a/src/kernel/olog/olog.c
> +++ b/src/kernel/olog/olog.c
> @@ -67,7 +67,10 @@ static int olog_test1(fwts_framework *fw)
>  	int errors = 0;
>  
>  	if (fwts_olog_firmware_check(fw, olog_progress, olog, &errors)) {
> -		fwts_log_error(fw, "Problem in the OLOG processing, see earlier in this log for details on the problem.");
> +		fwts_failed(fw, LOG_LEVEL_LOW,
> +			"olog_firmware_check",
> +			"Problem in the OLOG processing, see earlier in"
> +			" this log for details on the problem.");
>  		return FWTS_ERROR;
>  	}
>  
> diff --git a/src/lib/src/fwts_olog.c b/src/lib/src/fwts_olog.c
> index 12d693c..45e436d 100644
> --- a/src/lib/src/fwts_olog.c
> +++ b/src/lib/src/fwts_olog.c
> @@ -174,9 +174,10 @@ olog_cleanup_common:
>  	(void)fclose(msglog_outfile_f);
>  
>  olog_common_exit:
> -	fwts_log_error(fw, "Problem with the file handling on the default dumped "
> -		"OPAL msglog, %s, try using -o to specify a specific saved OPAL "
> -		"msglog for analysis.", msglog_outfile);
> +	fwts_log_error(fw, "Problem with the file handling on the"
> +		" default dumped OPAL msglog, %s, try running with"
> +		" sudo first then try using -o to specify a specific"
> +		" saved OPAL msglog for analysis.", msglog_outfile);
>  	return NULL;
>  }
>  
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
Alex Hung July 11, 2016, 2:52 a.m. UTC | #2
On 2016-07-08 04:05 AM, Deb McLemore wrote:
> When using non-root user file handling issues may prohibit
> proper olog authority.  Improve the message to suggest
> using sudo as a possible solution.
>
> Signed-off-by: Deb McLemore <debmc@linux.vnet.ibm.com>
> ---
>   src/kernel/olog/olog.c  | 5 ++++-
>   src/lib/src/fwts_olog.c | 7 ++++---
>   2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/src/kernel/olog/olog.c b/src/kernel/olog/olog.c
> index d8487f0..bb65279 100644
> --- a/src/kernel/olog/olog.c
> +++ b/src/kernel/olog/olog.c
> @@ -67,7 +67,10 @@ static int olog_test1(fwts_framework *fw)
>   	int errors = 0;
>
>   	if (fwts_olog_firmware_check(fw, olog_progress, olog, &errors)) {
> -		fwts_log_error(fw, "Problem in the OLOG processing, see earlier in this log for details on the problem.");
> +		fwts_failed(fw, LOG_LEVEL_LOW,
> +			"olog_firmware_check",
> +			"Problem in the OLOG processing, see earlier in"
> +			" this log for details on the problem.");
>   		return FWTS_ERROR;
>   	}
>
> diff --git a/src/lib/src/fwts_olog.c b/src/lib/src/fwts_olog.c
> index 12d693c..45e436d 100644
> --- a/src/lib/src/fwts_olog.c
> +++ b/src/lib/src/fwts_olog.c
> @@ -174,9 +174,10 @@ olog_cleanup_common:
>   	(void)fclose(msglog_outfile_f);
>
>   olog_common_exit:
> -	fwts_log_error(fw, "Problem with the file handling on the default dumped "
> -		"OPAL msglog, %s, try using -o to specify a specific saved OPAL "
> -		"msglog for analysis.", msglog_outfile);
> +	fwts_log_error(fw, "Problem with the file handling on the"
> +		" default dumped OPAL msglog, %s, try running with"
> +		" sudo first then try using -o to specify a specific"
> +		" saved OPAL msglog for analysis.", msglog_outfile);
>   	return NULL;
>   }
>
>


Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox

Patch

diff --git a/src/kernel/olog/olog.c b/src/kernel/olog/olog.c
index d8487f0..bb65279 100644
--- a/src/kernel/olog/olog.c
+++ b/src/kernel/olog/olog.c
@@ -67,7 +67,10 @@  static int olog_test1(fwts_framework *fw)
 	int errors = 0;
 
 	if (fwts_olog_firmware_check(fw, olog_progress, olog, &errors)) {
-		fwts_log_error(fw, "Problem in the OLOG processing, see earlier in this log for details on the problem.");
+		fwts_failed(fw, LOG_LEVEL_LOW,
+			"olog_firmware_check",
+			"Problem in the OLOG processing, see earlier in"
+			" this log for details on the problem.");
 		return FWTS_ERROR;
 	}
 
diff --git a/src/lib/src/fwts_olog.c b/src/lib/src/fwts_olog.c
index 12d693c..45e436d 100644
--- a/src/lib/src/fwts_olog.c
+++ b/src/lib/src/fwts_olog.c
@@ -174,9 +174,10 @@  olog_cleanup_common:
 	(void)fclose(msglog_outfile_f);
 
 olog_common_exit:
-	fwts_log_error(fw, "Problem with the file handling on the default dumped "
-		"OPAL msglog, %s, try using -o to specify a specific saved OPAL "
-		"msglog for analysis.", msglog_outfile);
+	fwts_log_error(fw, "Problem with the file handling on the"
+		" default dumped OPAL msglog, %s, try running with"
+		" sudo first then try using -o to specify a specific"
+		" saved OPAL msglog for analysis.", msglog_outfile);
 	return NULL;
 }