From 8f0d1ab6228494d4277bcb36a01bf7f33bf3abf8 Mon Sep 17 00:00:00 2001 From: Kevin Wolf <kwolf@redhat.com> Date: Fri, 3 Sep 2010 11:48:52 -0300 Subject: [PATCH 4/4] raw-posix: Don't use file name for host_cdrom detection on Linux RH-Author: Kevin Wolf <kwolf@redhat.com> Message-id: <1283514532-8401-4-git-send-email-kwolf@redhat.com> Patchwork-id: 11752 O-Subject: [RHEL-5.6 KVM PATCH 3/3] raw-posix: Don't use file name for host_cdrom detection on Linux Bugzilla: 609472 RH-Acked-by: Christoph Hellwig <chellwig@redhat.com> RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com> RH-Acked-by: Juan Quintela <quintela@redhat.com> RH-Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Bugzilla: 609472 Upstream status: Submitted On Linux, we have code to detect CD-ROMs using an ioctl. We shouldn't lose anything but false positives by removing the check for a /dev/cd* path. Signed-off-by: Kevin Wolf <kwolf@redhat.com> --- qemu/block-raw-posix.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- qemu/block-raw-posix.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/qemu/block-raw-posix.c b/qemu/block-raw-posix.c index ed11e81..239c1cd 100644 --- a/qemu/block-raw-posix.c +++ b/qemu/block-raw-posix.c @@ -900,9 +900,6 @@ static int cdrom_probe_device(const char *filename) int fd, ret; int prio = 0; - if (strstart(filename, "/dev/cd", NULL)) - prio = 50; - fd = open(filename, O_RDONLY | O_NONBLOCK); if (fd < 0) { goto out; -- 1.6.5.5