From 3ddd7424d5b8d90e5d3ed71e79d541716d734283 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 16 Jun 2011 08:47:24 -0300 Subject: [RHEL6 qemu-kvm PATCH 08/23] blockdev: Fix error message for invalid -drive CHS RH-Author: Markus Armbruster Message-id: <1308214055-31837-8-git-send-email-armbru@redhat.com> Patchwork-id: 27237 O-Subject: [PATCH RHEL-6.2 v2 07/18] blockdev: Fix error message for invalid -drive CHS Bugzilla: 627585 RH-Acked-by: Christoph Hellwig RH-Acked-by: Luiz Capitulino RH-Acked-by: Kevin Wolf When cyls, heads or secs are out of range, the error message prints buf, which points to the value of option "if". Bogus, may even be null. Drop that. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf (cherry picked from commit 483848540557aef6af08adbe3ef8201b961220d5) --- blockdev.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Signed-off-by: Eduardo Habkost --- blockdev.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 69a65e1..f8e2dcb 100644 --- a/blockdev.c +++ b/blockdev.c @@ -283,15 +283,15 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi, int *fatal_error) if (cyls || heads || secs) { if (cyls < 1 || (type == IF_IDE && cyls > 16383)) { - fprintf(stderr, "qemu: '%s' invalid physical cyls number\n", buf); + fprintf(stderr, "qemu: invalid physical cyls number\n"); return NULL; } if (heads < 1 || (type == IF_IDE && heads > 16)) { - fprintf(stderr, "qemu: '%s' invalid physical heads number\n", buf); + fprintf(stderr, "qemu: invalid physical heads number\n"); return NULL; } if (secs < 1 || (type == IF_IDE && secs > 63)) { - fprintf(stderr, "qemu: '%s' invalid physical secs number\n", buf); + fprintf(stderr, "qemu: invalid physical secs number\n"); return NULL; } } -- 1.7.3.2