From: Stefan Hajnoczi <stefanha@gmail.com>
To: Hannes Reinecke <hare@suse.de>
Cc: qemu-devel@nongnu.org, nab@linux-iscsi.org, kraxel@redhat.com
Subject: [Qemu-devel] Re: [PATCH] scsi: Implement 'get_sense' callback
Date: Mon, 22 Nov 2010 21:56:47 +0000 [thread overview]
Message-ID: <AANLkTik=HzOykPQqwomfMax2kOLZt2KMFjynTEFw-j14@mail.gmail.com> (raw)
In-Reply-To: <20101122101536.649BAF8D70@ochil.suse.de>
On Mon, Nov 22, 2010 at 10:15 AM, Hannes Reinecke <hare@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
next prev parent reply other threads:[~2010-11-22 21:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-22 10:15 [Qemu-devel] [PATCH] scsi: Implement 'get_sense' callback Hannes Reinecke
2010-11-22 21:56 ` Stefan Hajnoczi [this message]
2010-11-23 16:10 ` [Qemu-devel] " Hannes Reinecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTik=HzOykPQqwomfMax2kOLZt2KMFjynTEFw-j14@mail.gmail.com' \
--to=stefanha@gmail.com \
--cc=hare@suse.de \
--cc=kraxel@redhat.com \
--cc=nab@linux-iscsi.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).