Skip to content

Commit

Permalink
udisksata: Fix sense code format check
Browse files Browse the repository at this point in the history
Backport of udev id_ata changes:
systemd/systemd#13654
systemd/systemd#24923
  • Loading branch information
tbzatek committed Sep 9, 2024
1 parent 55d1ff3 commit 2667a8d
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 2667a8d

Please sign in to comment.