Re: CD writing in future Linux (stirring up a hornets' nest)

From: Krzysztof Halasa
Date: Sun Feb 05 2006 - 11:02:56 EST


Jan Engelhardt <jengelh@xxxxxxxxxxxxxxx> writes:

> I would say we all forgot to RTFM. Because O_EXCL does nothing *unless*
> O_CREAT is specified, which probably *is not* specified in cdrecord or
> hal.

That would be the case if the CD writter wasn't a block device.

For a block device fs/block_dev.c:

static int blkdev_open(struct inode * inode, struct file * filp)
{
...

if (!(filp->f_flags & O_EXCL) )
return 0;

if (!(res = bd_claim(bdev, filp)))
return 0;

blkdev_put(bdev);
return res;
--
Krzysztof Halasa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/