kopia lustrzana https://gitlab.com/sane-project/backends
snapscan: Fix debug logging in sense_handler()
Remove an extraneous log message. Ensure that a separate log message is only printed when the preceding if-statement is true (and its string argument has actually been set). Both issues were identified from GCC warnings about indentation.escl-add-user-and-password
rodzic
23addf5590
commit
bfa69c26e6
|
@ -144,7 +144,6 @@ static SANE_Status sense_handler (int scsi_fd, u_char * result, void *arg)
|
||||||
as_str = "Logical unit is in process of becoming ready.";
|
as_str = "Logical unit is in process of becoming ready.";
|
||||||
DBG (DL_MINOR_INFO, "%s: %s (%d seconds)\n", me, as_str, result[18]);
|
DBG (DL_MINOR_INFO, "%s: %s (%d seconds)\n", me, as_str, result[18]);
|
||||||
status = SANE_STATUS_DEVICE_BUSY;
|
status = SANE_STATUS_DEVICE_BUSY;
|
||||||
DBG (DL_MINOR_INFO, "%s: %s\n", me, sense_str);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x04:
|
case 0x04:
|
||||||
|
@ -160,8 +159,10 @@ static SANE_Status sense_handler (int scsi_fd, u_char * result, void *arg)
|
||||||
sense_str = "Illegal request.";
|
sense_str = "Illegal request.";
|
||||||
DBG (DL_MINOR_INFO, "%s: %s\n", me, sense_str);
|
DBG (DL_MINOR_INFO, "%s: %s\n", me, sense_str);
|
||||||
if (asc == 0x25 && ascq == 0x00)
|
if (asc == 0x25 && ascq == 0x00)
|
||||||
|
{
|
||||||
as_str = "Logical unit not supported.";
|
as_str = "Logical unit not supported.";
|
||||||
DBG (DL_MINOR_INFO, "%s: %s\n", me, as_str);
|
DBG (DL_MINOR_INFO, "%s: %s\n", me, as_str);
|
||||||
|
}
|
||||||
status = SANE_STATUS_IO_ERROR;
|
status = SANE_STATUS_IO_ERROR;
|
||||||
break;
|
break;
|
||||||
case 0x09:
|
case 0x09:
|
||||||
|
|
Ładowanie…
Reference in New Issue