Code review request: cdcontrol status label additon
    Giorgos Keramidas 
    keramida at ceid.upatras.gr
       
    Wed Jan 28 09:16:38 PST 2009
    
    
  
On Wed, 28 Jan 2009 18:29:10 +0200, Giorgos Keramidas <keramida at freebsd.org> wrote:
> On Wed, 28 Jan 2009 09:20:46 -0700 (MST), "M. Warner Losh" <imp at bsdimp.com> wrote:
>> Not going to look at glabel for this.  I lifted the code from glable,
>> but must have done it badly.  I'll grab a core 10 cd and see what's up.
>
> It may not be Fedora specific.  I just happened to have it handy...
>
> Sorry for creating *more* work for you.  I'll see if I can hack at
> cdcontrol too, and provide more useful input :)
If it helps at all, I added this:
            lseek(fd, ISO9660_OFFSET, SEEK_SET);
            rc = read (fd, buffer, CD_SECTOR_LEN);
+           if (rc == -1)
+               err(1, "read");
            if (rc == CD_SECTOR_LEN &&
              memcmp(buffer, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) == 0) {
and it seems that read() fails with EIO:
lseek(3,0x8000,SEEK_SET)                         = 32768 (0x8000)
read(3,0xbfbfe3a3,2048)                          ERR#5 'Input/output error'
My `/var/log/messages' shows at the same time:
Jan 28 19:01:52 kobe kernel: acd0: FAILURE - non aligned DMA transfer attempted
Jan 28 19:01:52 kobe kernel: acd0: setting up DMA failed
This is with a FreeBSD 8.0-CURRENT kernel from svn /head @ 187792.
So it may not really be a problem with the patch itself...
    
    
More information about the freebsd-hackers
mailing list