mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
blockdev: Drop redundant CHS validation for if=ide
Leave it to ide_init_drive(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
2adc99b277
commit
aaea3f366e
@ -330,15 +330,15 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
|
|||||||
max_devs = if_max_devs[type];
|
max_devs = if_max_devs[type];
|
||||||
|
|
||||||
if (cyls || heads || secs) {
|
if (cyls || heads || secs) {
|
||||||
if (cyls < 1 || (type == IF_IDE && cyls > 16383)) {
|
if (cyls < 1) {
|
||||||
error_report("invalid physical cyls number");
|
error_report("invalid physical cyls number");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (heads < 1 || (type == IF_IDE && heads > 16)) {
|
if (heads < 1) {
|
||||||
error_report("invalid physical heads number");
|
error_report("invalid physical heads number");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (secs < 1 || (type == IF_IDE && secs > 63)) {
|
if (secs < 1) {
|
||||||
error_report("invalid physical secs number");
|
error_report("invalid physical secs number");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user