On Mon, Nov 22, 2010 at 10:15 AM, Hannes Reinecke <h...@suse.de> wrote:
> +static int scsi_get_sense(SCSIRequest *req, uint8_t *outbuf, int len)
> +{
> +    SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, req->dev);
> +    int size = SCSI_SENSE_BUF_SIZE;

If there is no error we return SCSI_SENSE_BUF_SIZE without touching
outbuf?  I was expecting a memset(outbuf, 0, ...) or something that
initializes outbuf.

> +
> +    if (s->driver_status & SG_ERR_DRIVER_SENSE) {
> +        if (len < SCSI_SENSE_BUF_SIZE)

{}

> +            size = len;
> +        else

{}

Stefan

Reply via email to