]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ata_id: Add support for host managed zone block devices (#14933)
authorRyan Attard <frontrunner4000@gmail.com>
Thu, 27 Feb 2020 07:29:41 +0000 (01:29 -0600)
committerGitHub <noreply@github.com>
Thu, 27 Feb 2020 07:29:41 +0000 (16:29 +0900)
If the peripheral device type is that of a host managed zone block device (0x14),
the device supports the same identification mechanisms as conventional disks (0x00).

src/udev/ata_id/ata_id.c

index deeb939f54a17ed6b28e20e2a473abd012f03b56..57389372ce271f9e0c39fe986769f4e239a118ea 100644 (file)
@@ -354,7 +354,7 @@ static int disk_identify(int fd,
             ret = disk_identify_packet_device_command(fd, out_identify, 512);
             goto check_nul_bytes;
           }
-        if (peripheral_device_type != 0x00) {
+        if (!IN_SET(peripheral_device_type, 0x00, 0x14)) {
                 ret = -1;
                 errno = EIO;
                 goto out;