qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, armbru@redhat.com
Subject: [Qemu-devel] [PATCH 1/3] block: drive_init(): Fix indentation
Date: Thu, 30 Jun 2011 15:33:01 -0300	[thread overview]
Message-ID: <1309458783-12661-2-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1309458783-12661-1-git-send-email-lcapitulino@redhat.com>

Some constructions in that function have broken indentation. Fix them.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 blockdev.c |   52 ++++++++++++++++++++++++++--------------------------
 1 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/blockdev.c b/blockdev.c
index 7d579d6..27bf68a 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -272,23 +272,23 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
         if (type == IF_COUNT) {
             error_report("unsupported bus type '%s'", buf);
             return NULL;
-	}
+	    }
     }
     max_devs = if_max_devs[type];
 
     if (cyls || heads || secs) {
         if (cyls < 1 || (type == IF_IDE && cyls > 16383)) {
             error_report("invalid physical cyls number");
-	    return NULL;
-	}
+	        return NULL;
+	    }
         if (heads < 1 || (type == IF_IDE && heads > 16)) {
             error_report("invalid physical heads number");
-	    return NULL;
-	}
+	        return NULL;
+	    }
         if (secs < 1 || (type == IF_IDE && secs > 63)) {
             error_report("invalid physical secs number");
-	    return NULL;
-	}
+	        return NULL;
+	    }
     }
 
     if ((buf = qemu_opt_get(opts, "trans")) != NULL) {
@@ -297,31 +297,31 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
                          buf);
             return NULL;
         }
-        if (!strcmp(buf, "none"))
+        if (!strcmp(buf, "none")) {
             translation = BIOS_ATA_TRANSLATION_NONE;
-        else if (!strcmp(buf, "lba"))
+        } else if (!strcmp(buf, "lba")) {
             translation = BIOS_ATA_TRANSLATION_LBA;
-        else if (!strcmp(buf, "auto"))
+        } else if (!strcmp(buf, "auto")) {
             translation = BIOS_ATA_TRANSLATION_AUTO;
-	else {
+        } else {
             error_report("'%s' invalid translation type", buf);
-	    return NULL;
-	}
+	        return NULL;
+	    }
     }
 
     if ((buf = qemu_opt_get(opts, "media")) != NULL) {
         if (!strcmp(buf, "disk")) {
-	    media = MEDIA_DISK;
-	} else if (!strcmp(buf, "cdrom")) {
+	        media = MEDIA_DISK;
+	    } else if (!strcmp(buf, "cdrom")) {
             if (cyls || secs || heads) {
                 error_report("'%s' invalid physical CHS format", buf);
-	        return NULL;
+	            return NULL;
             }
-	    media = MEDIA_CDROM;
-	} else {
-	    error_report("'%s' invalid media", buf);
-	    return NULL;
-	}
+	        media = MEDIA_CDROM;
+	    } else {
+	        error_report("'%s' invalid media", buf);
+	        return NULL;
+	    }
     }
 
     if ((buf = qemu_opt_get(opts, "cache")) != NULL) {
@@ -480,17 +480,17 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
     case IF_XEN:
     case IF_NONE:
         switch(media) {
-	case MEDIA_DISK:
+	    case MEDIA_DISK:
             if (cyls != 0) {
                 bdrv_set_geometry_hint(dinfo->bdrv, cyls, heads, secs);
                 bdrv_set_translation_hint(dinfo->bdrv, translation);
             }
-	    break;
-	case MEDIA_CDROM:
+	        break;
+	    case MEDIA_CDROM:
             bdrv_set_removable(dinfo->bdrv, 1);
             dinfo->media_cd = 1;
-	    break;
-	}
+	        break;
+	    }
         break;
     case IF_SD:
         /* FIXME: This isn't really a floppy, but it's a reasonable
-- 
1.7.6.49.g033c2

  reply	other threads:[~2011-06-30 18:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-30 18:33 [Qemu-devel] [PATCH 0/3]: block: Small drive_init() improvements Luiz Capitulino
2011-06-30 18:33 ` Luiz Capitulino [this message]
2011-06-30 20:32   ` [Qemu-devel] [PATCH 1/3] block: drive_init(): Fix indentation Stefan Weil
2011-07-01  7:16   ` Markus Armbruster
2011-07-01 13:24     ` Luiz Capitulino
2011-06-30 18:33 ` [Qemu-devel] [PATCH 2/3] block: drive_init(): Simplify interface type setting Luiz Capitulino
2011-07-01  7:18   ` Markus Armbruster
2011-06-30 18:33 ` [Qemu-devel] [PATCH 3/3] block: drive_init(): Improve CHS setting error message Luiz Capitulino
2011-07-01  7:21   ` Markus Armbruster

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=1309458783-12661-2-git-send-email-lcapitulino@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@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 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).