From: Benjamin Close Date: Thu, 19 Feb 2009 04:09:29 +0000 (+1030) Subject: Error out when selecting a device by name but more than one instance of the name... X-Git-Url: https://diplodocus.org/git/xorg-xinput/commitdiff_plain/4134bd0f23acf3ff30311007ceba9ecbe568a70a Error out when selecting a device by name but more than one instance of the name exists Previously the check was in place for the duplicate name, however the first device with the requested name was still selected regardless. Correct this by exiting out forcing the user to select by id instead Signed-off-by: Benjamin Close --- diff --git a/src/xinput.c b/src/xinput.c index 466a814..b319326 100644 --- a/src/xinput.c +++ b/src/xinput.c @@ -191,6 +191,7 @@ find_device_info(Display *display, "Warning: There are multiple devices named \"%s\".\n" "To ensure the correct one is selected, please use " "the device ID instead.\n\n", name); + return NULL; } else { found = &devices[loop]; }