Bug 90226 - xinput --list-props returns exit code 0 when device not found
Summary: xinput --list-props returns exit code 0 when device not found
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xinput (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-29 07:16 UTC by Florian Stascheck
Modified: 2015-04-29 21:51 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

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.