All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Naphtali Sprei <nsprei@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] read-only: allow read-only CDROM with any interface
Date: Sun, 21 Mar 2010 10:29:53 -0700	[thread overview]
Message-ID: <4BA65791.8070207@twiddle.net> (raw)
In-Reply-To: <1269185633-31750-1-git-send-email-nsprei@redhat.com>

On 03/21/2010 08:33 AM, Naphtali Sprei wrote:
> -    if (ro == 1) {
> +    if (media == MEDIA_CDROM) {
> +        ro = 1;
> +    }
> +    if (ro == 1&&
> +        media != MEDIA_CDROM) { /* CDROM is fine for any interface, don't check */
>           if (type != IF_SCSI&&  type != IF_VIRTIO&&  type != IF_FLOPPY) {

Ug.  How about formatting this as

     if (media == MEDIA_CDROM) {
         /* CDROM is fine for any interface, don't check.  */
         ro = 1;
     } else if (ro == 1) {
         if (type != IF_SCSI ...)
     }

duplicating the MEDIA_CDROM test makes the logic harder to follow.


r~

  reply	other threads:[~2010-03-21 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-21 15:33 [Qemu-devel] [PATCH] read-only: allow read-only CDROM with any interface Naphtali Sprei
2010-03-21 17:29 ` Richard Henderson [this message]
2010-03-23 10:17 ` [Qemu-devel] [PATCH v2] " Naphtali Sprei

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=4BA65791.8070207@twiddle.net \
    --to=rth@twiddle.net \
    --cc=nsprei@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.