• Jeremy Higdon's avatar
    [PATCH] sg.c to warn about ambiguous data direction · dda8c33a
    Jeremy Higdon authored
    On Sat, Aug 28, 2004 at 02:39:45AM -0700, Jeremy Higdon wrote:
    > > Jeremy,
    > > You could use a (block scope) static and only print out
    > > the warning the first time it is detected.
    > >
    > > Doug Gilbert
    >
    > Yes, that's a good idea -- I'll add a rate limiter and also print
    > out the process name like James does in his recent deprecated
    > ioctl warning patch.  I'll send a new patch out later this weekend.
    > Sorry for the churn.
    >
    > thanks
    >
    > jeremy
    
    Okay, I'm pretty happy with this.  I get this kind of output:
    
    sg_write: data in/out 512/512 bytes for SCSI command 0x8--guessing data in;
       program java not setting count and/or reply_len properly
    printk: 11 messages suppressed.
    sg_write: data in/out 512/512 bytes for SCSI command 0x8--guessing data in;
       program java not setting count and/or reply_len properly
    printk: 4 messages suppressed.
    
    
    signed-off-by: jeremy@sgi.com
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
    dda8c33a
sg.c 83.3 KB