[waffle] [PATCH 2/2] wflinfo: Properly handle minor versions > 9
Dylan Baker
baker.dylan.c at gmail.com
Tue Apr 29 13:12:50 PDT 2014
On Tuesday, April 29, 2014 08:39:19 Jordan Justen wrote:
> Previously -V 1.40 would be treated the same as -V 5.0.
>
> Instead, whenever a minor version is requested greater
> than 9, bump the major version, and use 0 for the minor
> version.
>
> This leads to -V 1.40 being interpreted as -V 2.0.
>
> Alternatively, we might treat minor versions greater
> than 9 as an error.
>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
> src/utils/wflinfo.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c
> index 386bdd0..982311d 100644
> --- a/src/utils/wflinfo.c
> +++ b/src/utils/wflinfo.c
> @@ -336,6 +336,12 @@ parse_args(int argc, char *argv[], struct options *opts)
> usage_error_printf("'%s' is not a valid OpenGL version",
> optarg);
> }
> + if (minor > 9) {
> + // If a minor version greater than 9 was requested, then
> + // bump the major version and use 0 for the minor.
> + major++;
> + minor = 0;
> + }
> opts->context_version = 10 * major + minor;
> break;
> }
>
As a consumer of wflinfo I would prefer to see a bad version treated as an error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/waffle/attachments/20140429/5d7af9d4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/waffle/attachments/20140429/5d7af9d4/attachment.sig>
More information about the waffle
mailing list