After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674251 - Documentation not clear when g-s-d doesn't apply settings after hotplug-command
Documentation not clear when g-s-d doesn't apply settings after hotplug-command
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2012-04-17 12:55 UTC by Eric Piel
Modified: 2012-10-09 09:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
input: Clarify hotplug command exit value handling (2.44 KB, patch)
2012-09-21 16:27 UTC, Bastien Nocera
committed Details | Review

Description Eric Piel 2012-04-17 12:55:38 UTC
According to the comment for run_custom_command in:
http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/common/gsd-input-helper.c

g-s-d doesn't apply the default settings if the hotplug-command returns 1
According to the source code and to the comment in:
http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/common/input-device-example.sh

g-s-d doesn't apply the default settings if the hotplug-command returns 0

I'd recommend to fix the comment in gsd-input-helper.c to make it 0, like in the code.

Also it would be worth documenting this behaviour in the comment of the setting itself, there:
http://git.gnome.org/browse/gnome-settings-daemon/tree/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in

I'd add a sentence like:
The command should return 0 if the default settings should not be applied to the device.
Comment 1 Bastien Nocera 2012-09-21 16:27:09 UTC
Created attachment 224939 [details] [review]
input: Clarify hotplug command exit value handling

The code and the comments were confused as to whether 0 or 1 should
be the magic value to mean "don't configure this device any more".

We are now using an exit value of "1" to mean "don't touch this device",
as it requires the user explicitely saying that they don't want the
device touched anymore. An empty script shouldn't cause all the
configuration to suddenly break...
Comment 2 Bastien Nocera 2012-10-09 09:08:45 UTC
Attachment 224939 [details] pushed as 0c909e6 - input: Clarify hotplug command exit value handling