list-props allows for multiple devices to be queried simultaneously, so we
don't break out of the loop but rather change the exit code if at least one of
the devices doesn't exist.
X.Org Bug 90226 <http://bugs.freedesktop.org/show_bug.cgi?id=90226>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
int i;
int nprops;
Atom *props;
+ int rc = EXIT_SUCCESS;
if (argc == 0)
{
if (!info)
{
fprintf(stderr, "unable to find device '%s'\n", argv[i]);
+ rc = EXIT_FAILURE;
continue;
}
if (!dev)
{
fprintf(stderr, "unable to open device '%s'\n", info->name);
+ rc = EXIT_FAILURE;
continue;
}
XFree(props);
XCloseDevice(dpy, dev);
}
- return EXIT_SUCCESS;
+ return rc;
}
int i;
int nprops;
Atom *props;
+ int rc = EXIT_SUCCESS;
if (argc == 0)
{
if (!info)
{
fprintf(stderr, "unable to find device %s\n", argv[i]);
+ rc = EXIT_FAILURE;
continue;
}
XFree(props);
}
- return EXIT_SUCCESS;
+ return rc;
}
static int