util: file: Add helper to determine whether a path is a CDROM
Add detection mechanism which will allow to check whether a path to a block device is a physical CDROM drive. This will be useful once we will need to pass it to hypervisors. The linux implementation uses an ioctl to do the detection, while the fallback uses a simple string prefix match. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
Showing
想要评论请 注册 或 登录