summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-10-17 09:08:47 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-10-17 09:08:47 +0000
commit5afe3f042ae34a2645684d932a584aed980c045f (patch)
tree070dfec5c8c27e511a4024bc3cae9839f80afd18 /vl.c
parent5041fccd8ebed677f4d3012011657f8cc2340ea4 (diff)
downloadqemu-5afe3f042ae34a2645684d932a584aed980c045f.tar.gz
Only IDE needs limits for CHS configuration
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index 96838f85e9..eb2744e594 100644
--- a/vl.c
+++ b/vl.c
@@ -2078,15 +2078,15 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
}
if (cyls || heads || secs) {
- if (cyls < 1 || cyls > 16383) {
+ if (cyls < 1 || (type == IF_IDE && cyls > 16383)) {
fprintf(stderr, "qemu: '%s' invalid physical cyls number\n", buf);
return NULL;
}
- if (heads < 1 || heads > 16) {
+ if (heads < 1 || (type == IF_IDE && heads > 16)) {
fprintf(stderr, "qemu: '%s' invalid physical heads number\n", buf);
return NULL;
}
- if (secs < 1 || secs > 63) {
+ if (secs < 1 || (type == IF_IDE && secs > 63)) {
fprintf(stderr, "qemu: '%s' invalid physical secs number\n", buf);
return NULL;
}