lkml.org 
[lkml]   [2004]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: drivers/block/ub.c
    On Sun, 27 Jun 2004, Pete Zaitcev wrote:

    > This is very nice and would be a great help for Infiniband developers.
    > However, parts of SCSI commands are not defined in terms of C structures
    > or even 32 bit words with an endianness. They are streams of bytes, at
    > least historically. Please kindly refer to the WRITE(6) command for
    > the evidence. You'd need put_be20() to form that block address. :-)

    About 13 years ago I wrote a data analysis program for an NMR spectrometer
    that stored its output as 24-bit integers! Yes, one does encounter weird
    things from time to time. Still, having the functions I mentioned would
    be very handy in the majority of cases. They remove several
    possibilities for error (getting the bit shifts wrong, getting the array
    indexes wrong, associating the right bit shift with the wrong index).

    > I write these byte marshalling sequences since 1985 and I'm a little
    > used to them. I do not recall thinking twice about writing that element
    > of ub. It probably doesn't deserve all the tempest Oliver raised over it.

    Andries too.

    Alan Stern

    -
    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: 2005-03-22 14:04    [W:2.781 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site