From patchwork Thu Jun 30 18:33:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 102827 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CF60DB6F18 for ; Fri, 1 Jul 2011 06:10:09 +1000 (EST) Received: from localhost ([::1]:39212 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcNYs-0001zw-BE for incoming@patchwork.ozlabs.org; Thu, 30 Jun 2011 16:10:06 -0400 Received: from eggs.gnu.org ([140.186.70.92]:55878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcM38-0001ox-QR for qemu-devel@nongnu.org; Thu, 30 Jun 2011 14:33:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcM35-0007yj-Do for qemu-devel@nongnu.org; Thu, 30 Jun 2011 14:33:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcM34-0007yK-HG for qemu-devel@nongnu.org; Thu, 30 Jun 2011 14:33:11 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5UIX8is019110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 30 Jun 2011 14:33:08 -0400 Received: from localhost (ovpn-113-92.phx2.redhat.com [10.3.113.92]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5UIX7RW016547; Thu, 30 Jun 2011 14:33:08 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Thu, 30 Jun 2011 15:33:01 -0300 Message-Id: <1309458783-12661-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1309458783-12661-1-git-send-email-lcapitulino@redhat.com> References: <1309458783-12661-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, armbru@redhat.com Subject: [Qemu-devel] [PATCH 1/3] block: drive_init(): Fix indentation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Some constructions in that function have broken indentation. Fix them. Signed-off-by: Luiz Capitulino --- 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