[2/2] ivi-shell: Say something when configuration is missing

Submitted by Ondřej Majerech on Dec. 6, 2014, 12:39 a.m.

Details

Message ID a73d6184a15a0cb8b16314f8b9f0f1abb393455b.1417826148.git.majerech.o@gmail.com
State Superseded
Headers show

Not browsing as part of any series.

Commit Message

Ondřej Majerech Dec. 6, 2014, 12:39 a.m.
When ivi-module is not set in weston.conf, we probably want to tell the
user about their error instead of just dying.

Signed-off-by: Ondřej Majerech <majerech.o@gmail.com>
---
 ivi-shell/ivi-shell.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c
index a14010e..02fbafb 100644
--- a/ivi-shell/ivi-shell.c
+++ b/ivi-shell/ivi-shell.c
@@ -385,6 +385,7 @@  ivi_shell_setting_create(struct ivi_shell_setting *dest,
 	if (weston_config_section_get_string(
 		section, "ivi-module", &dest->ivi_module, NULL) != 0)
 	{
+		weston_log("No ivi-module set in weston.conf\n");
 		result = -1;
 	}
 

Comments

Derp. After sending this out, I noticed there's yet another low-hanging fruit to
be picked.

Ondřej Majerech (2):
  compositor: Propagate errors from module_init
  ivi-shell: Say something when configuration is missing

 ivi-shell/ivi-shell.c | 1 +
 src/compositor.c      | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
How about adding more info like following to clearly say which shell output this log?
weston_log("ivi-shell: No ivi-module set in weston.conf\n");

BR,
Nobuhiko Tanibata

> -----Original Message-----

> From: wayland-devel

> [mailto:wayland-devel-bounces@lists.freedesktop.org] On Behalf Of

> Ond?ej Majerech

> Sent: Saturday, December 06, 2014 9:39 AM

> To: wayland-devel@lists.freedesktop.org

> Cc: Ondřej Majerech

> Subject: [PATCH 2/2] ivi-shell: Say something when configuration is

> missing

> 

> When ivi-module is not set in weston.conf, we probably want to tell the

> user about their error instead of just dying.

> 

> Signed-off-by: Ondřej Majerech <majerech.o@gmail.com>

> ---

>  ivi-shell/ivi-shell.c | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c index

> a14010e..02fbafb 100644

> --- a/ivi-shell/ivi-shell.c

> +++ b/ivi-shell/ivi-shell.c

> @@ -385,6 +385,7 @@ ivi_shell_setting_create(struct ivi_shell_setting

> *dest,

>  	if (weston_config_section_get_string(

>  		section, "ivi-module", &dest->ivi_module, NULL) != 0)

>  	{

> +		weston_log("No ivi-module set in weston.conf\n");

>  		result = -1;

>  	}

> 

> --

> 1.9.3

> 

> _______________________________________________

> wayland-devel mailing list

> wayland-devel@lists.freedesktop.org

> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
On Tue, 9 Dec 2014 09:29:15 +0900
"Tanibata, Nobuhiko (ADITJ/SWG)" <ntanibata@jp.adit-jv.com> wrote:

> How about adding more info like following to clearly say which shell
> output this log? weston_log("ivi-shell: No ivi-module set in
> weston.conf\n");

Yes, clearly identifying the shell sounds like a good idea. :-)

> 
> BR,
> Nobuhiko Tanibata
> 
> > -----Original Message-----
> > From: wayland-devel
> > [mailto:wayland-devel-bounces@lists.freedesktop.org] On Behalf Of
> > Ond?ej Majerech
> > Sent: Saturday, December 06, 2014 9:39 AM
> > To: wayland-devel@lists.freedesktop.org
> > Cc: Ondřej Majerech
> > Subject: [PATCH 2/2] ivi-shell: Say something when configuration is
> > missing
> > 
> > When ivi-module is not set in weston.conf, we probably want to tell
> > the user about their error instead of just dying.
> > 
> > Signed-off-by: Ondřej Majerech <majerech.o@gmail.com>
> > ---
> >  ivi-shell/ivi-shell.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c index
> > a14010e..02fbafb 100644
> > --- a/ivi-shell/ivi-shell.c
> > +++ b/ivi-shell/ivi-shell.c
> > @@ -385,6 +385,7 @@ ivi_shell_setting_create(struct
> > ivi_shell_setting *dest,
> >  	if (weston_config_section_get_string(
> >  		section, "ivi-module", &dest->ivi_module, NULL) !=
> > 0) {
> > +		weston_log("No ivi-module set in weston.conf\n");
> >  		result = -1;
> >  	}
> > 
> > --
> > 1.9.3
> > 
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel