Skip to content

Commit

Permalink
Merge pull request #1311 from tbzatek/ata-cmd-1
Browse files Browse the repository at this point in the history
udisksata: Fix sense code format check
  • Loading branch information
tbzatek committed Sep 10, 2024
2 parents 3c667fd + 2667a8d commit 367fbc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/udisksata.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ udisks_ata_send_command_sync (gint fd,
}
}

if (!(sense[0] == 0x72 && desc[0] == 0x9 && desc[1] == 0x0c))
if (!((sense[0] & 0x7f) == 0x72 && desc[0] == 0x9 && desc[1] == 0x0c) &&
!((sense[0] & 0x7f) == 0x70 && sense[12] == 0x00 && sense[13] == 0x1d))
{
gchar *s = udisks_daemon_util_hexdump (sense, 32);
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
Expand Down

0 comments on commit 367fbc9

Please sign in to comment.