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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jan Engelhardt <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux