[PATCH weston] Add --version option.

Scott Moreau oreaus at gmail.com
Fri Feb 1 20:02:36 PST 2013


On Wed, Aug 29, 2012 at 3:15 PM, Scott Moreau <oreaus at gmail.com> wrote:

> ---
>  src/compositor.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/compositor.c b/src/compositor.c
> index df28cb7..42d4051 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -3565,6 +3565,7 @@ int main(int argc, char *argv[])
>         int32_t idle_time = 300;
>         int32_t xserver = 0;
>         int32_t help = 0;
> +       int32_t version = 0;
>         char *socket_name = NULL;
>         char *config_file;
>
> @@ -3585,6 +3586,7 @@ int main(int argc, char *argv[])
>                 { WESTON_OPTION_STRING, "module", 0, &module },
>                 { WESTON_OPTION_STRING, "log", 0, &log },
>                 { WESTON_OPTION_BOOLEAN, "help", 'h', &help },
> +               { WESTON_OPTION_BOOLEAN, "version", 0, &version },
>         };
>
>         argc = parse_options(core_options,
> @@ -3593,6 +3595,11 @@ int main(int argc, char *argv[])
>         if (help)
>                 usage(EXIT_SUCCESS);
>
> +       if (version) {
> +               printf(PACKAGE_STRING "\n");
> +               return EXIT_SUCCESS;
> +       }
> +
>         weston_log_file_open(log);
>
>         weston_log("%s\n"
> --
> 1.7.11.4
>
>
Hi, I noticed a few people asked why there is no --version for weston. Is
there any reason to not apply something like this?

- Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130201/26934cd6/attachment.html>


More information about the wayland-devel mailing list