Re: [PATCH v4 08/21] modetest: Add a command line parameter to set properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 19 March 2013 15:55:49 Laurent Pinchart wrote:
> The -w parameter can be used to set a property value from the command
> line, using the target object ID and the property name.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> ---
>  tests/modetest/modetest.c | 108 ++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 106 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
> index f58c01d..7153a40 100644
> --- a/tests/modetest/modetest.c
> +++ b/tests/modetest/modetest.c

[snip]

> @@ -1122,6 +1210,19 @@ int main(int argc, char **argv)
>  		case 'v':
>  			test_vsync = 1;
>  			break;
> +		case 'w':
> +			prop_args = realloc(prop_args,
> +					   (prop_count + 1) * sizeof *prop_args);
> +			if (con_args == NULL) {

This should obviously be prop_args. I'll fix it in v5.

> +				fprintf(stderr, "memory allocation failed\n");
> +				return 1;
> +			}
> +
> +			if (parse_property(&prop_args[prop_count], optarg) < 0)
> +				usage(argv[0]);
> +
> +			prop_count++;
> +			break;
>  		default:
>  			usage(argv[0]);
>  			break;

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux