[PATCH] Override modules list and don't always load desktop-shell.so
Pier Luigi Fiorini
pierluigi.fiorini at gmail.com
Sun Apr 14 10:17:40 PDT 2013
Let --modules override modules list and load desktop-shell.so as a
fallback if a modules list is not specified neither by passing
--modules nor with weston.ini.
Signed-off-by: Pier Luigi Fiorini <pierluigi.fiorini at gmail.com>
---
man/weston.man | 5 +++--
src/compositor.c | 7 +++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/man/weston.man b/man/weston.man
index 39d854b..75ce637 100644
--- a/man/weston.man
+++ b/man/weston.man
@@ -125,8 +125,9 @@ Append log messages to the file
instead of writing them to stderr.
.TP
\fB\-\-modules\fR=\fImodule1.so,module2.so\fR
-Load the comma-separated list of modules. Only used by the test
-suite. The file is searched for in
+Load the comma-separated list of modules, overriding any module listed
+in weston.ini.
+The file is searched for in
.IR "__weston_modules_dir__" ,
or you can pass an absolute path.
.TP
diff --git a/src/compositor.c b/src/compositor.c
index 693df2c..2ee9d68 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3466,7 +3466,8 @@ usage(int error_code)
"\t\t\t\twayland-backend.so\n"
" -S, --socket=NAME\tName of socket to listen on\n"
" -i, --idle-time=SECS\tIdle time in seconds\n"
- " --modules\t\tLoad the comma-separated list of modules\n"
+ " --modules\t\tLoad the comma-separated list of modules overriding\n"
+ "\t\t\tany module listed in weston.ini\n"
" --log==FILE\t\tLog to the given file\n"
" -h, --help\t\tThis help message\n\n");
@@ -3617,9 +3618,7 @@ int main(int argc, char *argv[])
setenv("WAYLAND_DISPLAY", socket_name, 1);
- if (load_modules(ec, modules, &argc, argv, config_file) < 0)
- goto out;
- if (load_modules(ec, option_modules, &argc, argv, config_file) < 0)
+ if (load_modules(ec, option_modules ? option_modules : modules, &argc, argv, config_file) < 0)
goto out;
free(config_file);
--
1.8.2.1
More information about the wayland-devel
mailing list