Christoph Hellwig wrote:
> On Tue, Jan 12, 2010 at 10:29:11AM -0500, Cole Robinson wrote:
> > static int cdrom_probe_device(const char *filename)
> > {
> > +int fd, ret, prio;
> > +
> > if (strstart(filename, "/dev/cd", NULL))
> > -return 100;
> > -return 0;
> > +prio
On Tue, Jan 12, 2010 at 10:29:11AM -0500, Cole Robinson wrote:
> static int cdrom_probe_device(const char *filename)
> {
> +int fd, ret, prio;
> +
> if (strstart(filename, "/dev/cd", NULL))
> -return 100;
> -return 0;
> +prio = 50;
> +
> +fd = open(filename, O_RDO
Current CDROM detection is hardcoded based on source file name.
Make this smarter 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
Signed-off-by: Cole Robinson
---
block/raw-posix.c | 19