summaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-01-17 19:31:26 +0100
committerKevin Wolf <kwolf@redhat.com>2011-01-24 16:49:49 +0100
commit1aa95d3730c1a5b032e3fa16e074ad79a42d44f7 (patch)
treed610f1fc630b132f8985f99ec5cf0bd1348ee4b5 /blockdev.c
parent50a21e0302451f307d993e4529d430da1ac6ebd7 (diff)
downloadqemu-1aa95d3730c1a5b032e3fa16e074ad79a42d44f7.tar.gz
qemu-1aa95d3730c1a5b032e3fa16e074ad79a42d44f7.tar.bz2
qemu-1aa95d3730c1a5b032e3fa16e074ad79a42d44f7.zip
blockdev: Fix error message for invalid -drive CHS
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 <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/blockdev.c b/blockdev.c
index 662f7a9d86..28c051ba89 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -224,15 +224,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;
}
}