[PATCH] scanner: Fix reported executable name to 'wayland-scanner'

Yong Bakos junk at humanoriented.com
Fri Jun 3 23:42:34 UTC 2016


On Jun 3, 2016, at 4:33 AM, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> 
> On Fri, Jun 03, 2016 at 09:16:43AM +0800, Jonas Ã…dahl wrote:
>> On Thu, Jun 02, 2016 at 02:42:44PM -0700, Bryce Harrington wrote:
>>> 'wayland-scanner -v' (correctly) reports the program as named
>>> "wayland-scanner", but 'wayland-scanner -h' was inconsistent, referring
>>> to it as './scanner'.
>>> 
>>> Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
>> 
>> I guess we could also pass argv and use argv[0], but this works as well.
> 
> can't we use program_invocation_short_name here? or is that to GNU-ish?
> 
> Cheers,
>   Peter

On that note, there are four occurrences of the string "wayland-scanner"
that could be extracted in a similar fashion. I humbly encourage that this
patch refactor all of them. Using program_invocation_short_name or a
single #define might suffice.

Best,
yong



More information about the wayland-devel mailing list