drivers: Use clearer messages using parameters
This commit is contained in:
parent
f6559ba8b1
commit
1b23f0efe1
3 changed files with 28 additions and 13 deletions
|
@ -131,7 +131,9 @@ aesX660_read_calibrate_data_cb (FpiUsbTransfer *transfer,
|
|||
fp_dbg ("Bogus calibrate response: %.2x\n", data[0]);
|
||||
fpi_ssm_mark_failed (transfer->ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Bogus calibrate response"));
|
||||
"Bogus calibrate "
|
||||
"response: %.2x",
|
||||
data[0]));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -175,7 +177,8 @@ finger_det_read_fd_data_cb (FpiUsbTransfer *transfer,
|
|||
fp_dbg ("Bogus FD response: %.2x\n", data[0]);
|
||||
fpi_ssm_mark_failed (transfer->ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Bogus FD response"));
|
||||
"Bogus FD response %.2x",
|
||||
data[0]));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -538,7 +541,8 @@ activate_read_id_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||
fp_dbg ("Bogus read ID response: %.2x\n", data[AESX660_RESPONSE_TYPE_OFFSET]);
|
||||
fpi_ssm_mark_failed (transfer->ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Bogus read ID response"));
|
||||
"Bogus read ID response %.2x",
|
||||
data[AESX660_RESPONSE_TYPE_OFFSET]));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -565,7 +569,8 @@ activate_read_id_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||
fp_dbg ("Failed to init device! init status: %.2x\n", data[7]);
|
||||
fpi_ssm_mark_failed (transfer->ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Failed to init device"));
|
||||
"Failed to init device %.2x",
|
||||
data[7]));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -594,7 +599,8 @@ activate_read_init_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||
data[3]);
|
||||
fpi_ssm_mark_failed (transfer->ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Bogus read init response"));
|
||||
"Bogus read init response: "
|
||||
"%.2x %.2x", data[0], data[3]));
|
||||
return;
|
||||
}
|
||||
priv->init_cmd_idx++;
|
||||
|
|
|
@ -137,7 +137,8 @@ cmd_recieve_cb (FpiUsbTransfer *transfer,
|
|||
fp_warn ("Received General Error %d from the sensor", (guint) err);
|
||||
fpi_ssm_mark_failed (transfer->ssm,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Received general error from device"));
|
||||
"Received general error %u from device",
|
||||
(guint) err));
|
||||
//fpi_ssm_jump_to_state (transfer->ssm, fpi_ssm_get_cur_state (transfer->ssm));
|
||||
return;
|
||||
}
|
||||
|
@ -472,7 +473,8 @@ list_msg_cb (FpiDeviceSynaptics *self,
|
|||
fpi_device_list_complete (FP_DEVICE (self),
|
||||
NULL,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL,
|
||||
"Failed to query enrolled users"));
|
||||
"Failed to query enrolled users: %d",
|
||||
resp->result));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -770,7 +772,8 @@ enroll_msg_cb (FpiDeviceSynaptics *self,
|
|||
fpi_device_enroll_complete (device,
|
||||
NULL,
|
||||
fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL,
|
||||
"Enrollment failed"));
|
||||
"Enrollment failed (%d)",
|
||||
resp->result));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1052,7 +1055,11 @@ dev_probe (FpDevice *device)
|
|||
self->mis_version.build_num);
|
||||
|
||||
error = fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL,
|
||||
"Unsupported firmware version");
|
||||
"Unsupported firmware version "
|
||||
"(%d.%d with build number %d)",
|
||||
self->mis_version.version_major,
|
||||
self->mis_version.version_minor,
|
||||
self->mis_version.build_num);
|
||||
goto err_close;
|
||||
}
|
||||
|
||||
|
@ -1120,7 +1127,7 @@ fps_deinit_cb (FpiDeviceSynaptics *self,
|
|||
case BMKT_RSP_POWER_DOWN_FAIL:
|
||||
fp_info ("Failed to go to power down mode: %d", resp->result);
|
||||
error = fpi_device_error_new_msg (FP_DEVICE_ERROR_GENERAL,
|
||||
"Power down failed");
|
||||
"Power down failed: %d", resp->result);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ __handle_incoming_msg (FpDevice *device,
|
|||
{
|
||||
fp_warn ("cmd response too short (%d)", len);
|
||||
error = fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"CMD response too short");
|
||||
"CMD response too short (%d)", len);
|
||||
goto err;
|
||||
}
|
||||
if (innerbuf[0] != 0x28)
|
||||
|
@ -371,7 +371,8 @@ read_msg_cb (FpiUsbTransfer *transfer, FpDevice *device,
|
|||
fp_err ("async msg read too short (%d)",
|
||||
(gint) transfer->actual_length);
|
||||
error = fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Packet from device was too short");
|
||||
"Packet from device was too short (%lu)",
|
||||
transfer->actual_length);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
@ -798,7 +799,8 @@ read_msg01_cb (FpDevice *dev, enum read_msg_type type,
|
|||
{
|
||||
fp_err ("expected seq=1, got %x", seq);
|
||||
fpi_ssm_mark_failed (ssm, fpi_device_error_new_msg (FP_DEVICE_ERROR_PROTO,
|
||||
"Got wrong sequence number"));
|
||||
"Got wrong sequence number (%x)",
|
||||
seq));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue