mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
utils: Uniform the no-devices error messages removing duplicated checks
Use error messages to be consistent, and avoid checking for a returned value when dbus-glib function to fetch it returned false, as it's implicit that we had a failure. Otherwise if didn't fail we are sure that we got the requested value.
This commit is contained in:
@ -54,14 +54,9 @@ static DBusGProxy *open_device(const char *username)
|
||||
DBusGProxy *dev;
|
||||
|
||||
if (!net_reactivated_Fprint_Manager_get_default_device(manager, &path, &error)) {
|
||||
g_print("list_devices failed: %s\n", error->message);
|
||||
g_print("Impossible to verify: %s\n", error->message);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (path == NULL) {
|
||||
g_print("No devices found\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
g_print("Using device %s\n", path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user