]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid/src/probe: check for ENOMEDIUM from ioctl(CDROM_LAST_WRITTEN)
authorJeremi Piotrowski <jpiotrowski@linux.microsoft.com>
Wed, 8 Dec 2021 17:09:53 +0000 (09:09 -0800)
committerKarel Zak <kzak@redhat.com>
Fri, 10 Dec 2021 14:19:22 +0000 (15:19 +0100)
commitc80b3f3200486d8f11a56afa9bb2c27b9cc4ffe3
tree4f10569ce66afccb211fc32d04b08f9404781502
parentfd2ae1e1b03cb8e9a76aa55c47769991f7dd5d4d
libblkid/src/probe: check for ENOMEDIUM from ioctl(CDROM_LAST_WRITTEN)

The CD device on Azure VMs returns CDS_DISC_OK from CDROM_DRIVE_STATUS even
when no disc is present. In that case an ENOMEDIUM from CDROM_LAST_WRITTEN
follows. Catch that and return error to prevent probing which results in
hundreds of "unaligned transfer" warnings in the kernel logbuffer.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
libblkid/src/probe.c