Bug 90226

Summary: xinput --list-props returns exit code 0 when device not found
Product: xorg Reporter: Florian Stascheck <levu>
Component: App/xinputAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: peter.hutterer
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Florian Stascheck 2015-04-29 07:16:28 UTC
When xinput --list-props is called with an invalid device id, it returns the exit code 0. Expected is 1 in this case like xinput list does:

levu@caamas ~$ xinput --list-props "Logitech Rechargeable Touchpad T650"
unable to find device Logitech Rechargeable Touchpad T650
levu@caamas ~$ echo $?
0

vs.

levu@caamas ~$ xinput list "Logitech Rechargeable Touchpad T650"
unable to find device Logitech Rechargeable Touchpad T650
levu@caamas ~$ echo $?                                          
1
Comment 1 Florian Stascheck 2015-04-29 07:17:48 UTC
(In reply to Florian Stascheck from comment #0)
> When xinput --list-props is called with an invalid device id, it returns the
> exit code 0. Expected is 1 in this case like xinput list does:
> 
> levu@caamas ~$ xinput --list-props "Logitech Rechargeable Touchpad T650"
> unable to find device Logitech Rechargeable Touchpad T650
> levu@caamas ~$ echo $?
> 0
> 
> vs.
> 
> levu@caamas ~$ xinput list "Logitech Rechargeable Touchpad T650"
> unable to find device Logitech Rechargeable Touchpad T650
> levu@caamas ~$ echo $?                                          
> 1

forgot to mention: version is xinput version 1.6.1, XI version on server: 2.3 (via arch linux package version 1.6.1-1)
Comment 2 Peter Hutterer 2015-04-29 21:51:29 UTC
thanks, fixed

commit 90463ec26d4c89bdf63aab4ddac9f8295b6589cc
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Apr 30 07:47:28 2015 +1000

    property: return EXIT_FAILURE if at least one device fails (#90226)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.