raw-posix: Detect CDROM via ioctl on linux
Current CDROM detection is hardcoded based on source file name. Make this smarter on linux by attempting a CDROM specific ioctl. This makes '-cdrom /dev/sr0' succeed with no media present. v2: Give ioctl check higher priority than filename check. v3: Actually initialize 'prio' variable. Check for ioctl success rather than absence of specific failure. v4: Explicitly mention that change is linux specific. Signed-off-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
Showing
想要评论请 注册 或 登录