On Thu, 2004-11-18 at 11:09 -0500, Alan Cox wrote:
On Thu, Nov 18, 2004 at 10:54:49AM -0500, David Zeuthen wrote:
> Really? Because using the BLKGETSIZE64 ioctl() on the device file we get
Yes - see the specification.
I'm curious why BLKGETSIZE64 ioctl() then succeeds and give me the size
if you say it's bogus? Care to explain the 4096 byte difference?
Hmm, it looks like I should put code in hal to set size as zero for CD-R
and CD-RW media [1] and then make the fs detection code in hal not look
at the end of the disk if size is zero.
[1] : Exactly what media does this apply to? All non DVD-ROM and CD-ROM?
Btw, wouldn't it be a lot nicer if the kernel started to give out
e.g. /sys/block/hdc/hdc%d for the various partitions and sessions
(assuming hdc is an optical IDE drive)? I guess the kernel could safely
give the right size of /sys/block/hdc/hdc1. With that it would be a lot
easier to support e.g. PhotoCD discs (which are multisession). FWIW,
that's what Darwin does.
Cheers,
David