[PATCH weston 4/9] ivi-layout: abort without controller_module_init
Tanibata, Nobuhiko (ADITJ/SWG)
ntanibata at jp.adit-jv.com
Wed Apr 1 18:04:12 PDT 2015
> -----Original Message-----
> From: wayland-devel
> [mailto:wayland-devel-bounces at lists.freedesktop.org] On Behalf Of Pekka
> Paalanen
> Sent: Monday, March 30, 2015 6:21 PM
> To: wayland-devel at lists.freedesktop.org
> Cc: Pekka Paalanen; Nobuhiko Tanibata
> Subject: [PATCH weston 4/9] ivi-layout: abort without
> controller_module_init
>
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> When loading a controller module, if we do not find a controller_module_init
> symbol, return failure to the caller instead of ignoring the failure.
>
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
[ntanibata]
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp>
BR,
Nobuhiko Tanibata
> ---
> ivi-shell/ivi-layout.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index
> 6b2604e..cd4a171 100644
> --- a/ivi-shell/ivi-layout.c
> +++ b/ivi-shell/ivi-layout.c
> @@ -2953,12 +2953,14 @@ load_controller_modules(struct weston_compositor
> *compositor, const char *module
> snprintf(buffer, sizeof buffer, "%.*s", (int)(end - p),
> p);
>
> controller_module_init = weston_load_module(buffer,
> "controller_module_init");
> - if (controller_module_init)
> - if(controller_module_init(compositor, argc,
> argv,
> -
> &ivi_controller_interface,
> - sizeof(struct
> ivi_controller_interface)) != 0) {
> - weston_log("ivi-shell: Initialization
> of controller module fails");
> - return -1;
> + if (!controller_module_init)
> + return -1;
> +
> + if (controller_module_init(compositor, argc, argv,
> + &ivi_controller_interface,
> + sizeof(struct
> ivi_controller_interface)) != 0) {
> + weston_log("ivi-shell: Initialization of
> controller module fails");
> + return -1;
> }
>
> p = end;
> --
> 2.0.5
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list