From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58589 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtL2U-0002pg-SO for qemu-devel@nongnu.org; Wed, 08 Sep 2010 09:50:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtKip-0005cd-DF for qemu-devel@nongnu.org; Wed, 08 Sep 2010 09:29:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17486) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtKip-0005cV-4c for qemu-devel@nongnu.org; Wed, 08 Sep 2010 09:29:55 -0400 From: Kevin Wolf Date: Wed, 8 Sep 2010 15:29:35 +0200 Message-Id: <1283952582-17498-19-git-send-email-kwolf@redhat.com> In-Reply-To: <1283952582-17498-1-git-send-email-kwolf@redhat.com> References: <1283952582-17498-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 18/25] qemu-io: Make alloc output useful when nb_sectors=1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Stefan Hajnoczi There is no indication whether or not the sector is allocated when nb_sectors=1: sector allocated at offset 64 KiB This message is produced whether or not the sector is allocated. Simply use the same message as the plural case, I don't think the English is so broken that we need special case output here: 0/1 sectors allocated at offset 64 KiB This change does not affect qemu-iotests since nb_sectors=1 is not used there. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- qemu-io.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index 2dbe20f..bd3bd16 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -1427,11 +1427,8 @@ alloc_f(int argc, char **argv) cvtstr(offset, s1, sizeof(s1)); - if (nb_sectors == 1) - printf("sector allocated at offset %s\n", s1); - else - printf("%d/%d sectors allocated at offset %s\n", - sum_alloc, nb_sectors, s1); + printf("%d/%d sectors allocated at offset %s\n", + sum_alloc, nb_sectors, s1); return 0; } -- 1.7.2.2