lkml.org 
[lkml]   [2006]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: CD writing in future Linux (stirring up a hornets' nest)
From
Date
Jan Engelhardt <jengelh@linux01.gwdg.de> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-05 17:07    [W:1.183 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site