[igt-dev] [PATCH i-g-t v2] gem_wsim: Implement device selection

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Wed Nov 18 11:56:02 UTC 2020


On 17/11/2020 14:06, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2020-11-17 13:59:18)
>> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>>
>> -L and -D <device> on the command line.
>>
>> With no device specified tool tries to find i915 discrete or integrated in
>> that order.
>>
>> v2:
>>   * Fix error handling and support render devices.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> 
> Hmm, optarg should be a pointer into the argv, so is the copy necessary?

I don't remember if I tried, and I don't see that getopt(3) explains 
optarg from that angle, so probably safest to keep as is. Too lazy to 
try.. Or maybe presence of strdup suggests I did already try and that 
optarg is indeed temporary copy managed by getopt.

Regards,

Tvrtko


More information about the igt-dev mailing list