block: Remove the deprecated -hdachs option
It's been marked as deprecated since QEMU v2.10.0, and so far nobody complained that we should keep it, so let's remove this legacy option now to simplify the code quite a bit. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
0e153b04cc
commit
d1cdd92e5c
|
@ -2686,14 +2686,6 @@ The ``--net dump'' argument is now replaced with the
|
||||||
``-object filter-dump'' argument which works in combination
|
``-object filter-dump'' argument which works in combination
|
||||||
with the modern ``-netdev`` backends instead.
|
with the modern ``-netdev`` backends instead.
|
||||||
|
|
||||||
@subsection -hdachs (since 2.10.0)
|
|
||||||
|
|
||||||
The ``-hdachs'' argument is now a synonym for setting
|
|
||||||
the ``cyls'', ``heads'', ``secs'', and ``trans'' properties
|
|
||||||
on the ``ide-hd'' device using the ``-device'' argument.
|
|
||||||
The new syntax allows different settings to be provided
|
|
||||||
per disk.
|
|
||||||
|
|
||||||
@subsection -usbdevice (since 2.10.0)
|
@subsection -usbdevice (since 2.10.0)
|
||||||
|
|
||||||
The ``-usbdevice DEV'' argument is now a synonym for setting
|
The ``-usbdevice DEV'' argument is now a synonym for setting
|
||||||
|
|
|
@ -846,8 +846,8 @@ of available connectors of a given interface type.
|
||||||
@item media=@var{media}
|
@item media=@var{media}
|
||||||
This option defines the type of the media: disk or cdrom.
|
This option defines the type of the media: disk or cdrom.
|
||||||
@item cyls=@var{c},heads=@var{h},secs=@var{s}[,trans=@var{t}]
|
@item cyls=@var{c},heads=@var{h},secs=@var{s}[,trans=@var{t}]
|
||||||
These options have the same definition as they have in @option{-hdachs}.
|
Force disk physical geometry and the optional BIOS translation (trans=none or
|
||||||
These parameters are deprecated, use the corresponding parameters
|
lba). These parameters are deprecated, use the corresponding parameters
|
||||||
of @code{-device} instead.
|
of @code{-device} instead.
|
||||||
@item snapshot=@var{snapshot}
|
@item snapshot=@var{snapshot}
|
||||||
@var{snapshot} is "on" or "off" and controls snapshot mode for the given drive
|
@var{snapshot} is "on" or "off" and controls snapshot mode for the given drive
|
||||||
|
@ -1027,21 +1027,6 @@ the raw disk image you use is not written back. You can however force
|
||||||
the write back by pressing @key{C-a s} (@pxref{disk_images}).
|
the write back by pressing @key{C-a s} (@pxref{disk_images}).
|
||||||
ETEXI
|
ETEXI
|
||||||
|
|
||||||
DEF("hdachs", HAS_ARG, QEMU_OPTION_hdachs, \
|
|
||||||
"-hdachs c,h,s[,t]\n" \
|
|
||||||
" force hard disk 0 physical geometry and the optional BIOS\n" \
|
|
||||||
" translation (t=none or lba) (usually QEMU can guess them)\n",
|
|
||||||
QEMU_ARCH_ALL)
|
|
||||||
STEXI
|
|
||||||
@item -hdachs @var{c},@var{h},@var{s},[,@var{t}]
|
|
||||||
@findex -hdachs
|
|
||||||
Force hard disk 0 physical geometry (1 <= @var{c} <= 16383, 1 <=
|
|
||||||
@var{h} <= 16, 1 <= @var{s} <= 63) and optionally force the BIOS
|
|
||||||
translation mode (@var{t}=none, lba or auto). Usually QEMU can guess
|
|
||||||
all those parameters. This option is deprecated, please use
|
|
||||||
@code{-device ide-hd,cyls=c,heads=h,secs=s,...} instead.
|
|
||||||
ETEXI
|
|
||||||
|
|
||||||
DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev,
|
DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev,
|
||||||
"-fsdev fsdriver,id=id[,path=path,][security_model={mapped-xattr|mapped-file|passthrough|none}]\n"
|
"-fsdev fsdriver,id=id[,path=path,][security_model={mapped-xattr|mapped-file|passthrough|none}]\n"
|
||||||
" [,writeout=immediate][,readonly][,socket=socket|sock_fd=sock_fd][,fmode=fmode][,dmode=dmode]\n"
|
" [,writeout=immediate][,readonly][,socket=socket|sock_fd=sock_fd][,fmode=fmode][,dmode=dmode]\n"
|
||||||
|
|
86
vl.c
86
vl.c
|
@ -3052,9 +3052,8 @@ int main(int argc, char **argv, char **envp)
|
||||||
const char *boot_order = NULL;
|
const char *boot_order = NULL;
|
||||||
const char *boot_once = NULL;
|
const char *boot_once = NULL;
|
||||||
DisplayState *ds;
|
DisplayState *ds;
|
||||||
int cyls, heads, secs, translation;
|
|
||||||
QemuOpts *opts, *machine_opts;
|
QemuOpts *opts, *machine_opts;
|
||||||
QemuOpts *hda_opts = NULL, *icount_opts = NULL, *accel_opts = NULL;
|
QemuOpts *icount_opts = NULL, *accel_opts = NULL;
|
||||||
QemuOptsList *olist;
|
QemuOptsList *olist;
|
||||||
int optind;
|
int optind;
|
||||||
const char *optarg;
|
const char *optarg;
|
||||||
|
@ -3146,8 +3145,6 @@ int main(int argc, char **argv, char **envp)
|
||||||
|
|
||||||
cpu_model = NULL;
|
cpu_model = NULL;
|
||||||
snapshot = 0;
|
snapshot = 0;
|
||||||
cyls = heads = secs = 0;
|
|
||||||
translation = BIOS_ATA_TRANSLATION_AUTO;
|
|
||||||
|
|
||||||
nb_nics = 0;
|
nb_nics = 0;
|
||||||
|
|
||||||
|
@ -3186,7 +3183,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
if (optind >= argc)
|
if (optind >= argc)
|
||||||
break;
|
break;
|
||||||
if (argv[optind][0] != '-') {
|
if (argv[optind][0] != '-') {
|
||||||
hda_opts = drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
|
drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
|
||||||
} else {
|
} else {
|
||||||
const QEMUOption *popt;
|
const QEMUOption *popt;
|
||||||
|
|
||||||
|
@ -3206,21 +3203,6 @@ int main(int argc, char **argv, char **envp)
|
||||||
cpu_model = optarg;
|
cpu_model = optarg;
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_hda:
|
case QEMU_OPTION_hda:
|
||||||
{
|
|
||||||
char buf[256];
|
|
||||||
if (cyls == 0)
|
|
||||||
snprintf(buf, sizeof(buf), "%s", HD_OPTS);
|
|
||||||
else
|
|
||||||
snprintf(buf, sizeof(buf),
|
|
||||||
"%s,cyls=%d,heads=%d,secs=%d%s",
|
|
||||||
HD_OPTS , cyls, heads, secs,
|
|
||||||
translation == BIOS_ATA_TRANSLATION_LBA ?
|
|
||||||
",trans=lba" :
|
|
||||||
translation == BIOS_ATA_TRANSLATION_NONE ?
|
|
||||||
",trans=none" : "");
|
|
||||||
drive_add(IF_DEFAULT, 0, optarg, buf);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case QEMU_OPTION_hdb:
|
case QEMU_OPTION_hdb:
|
||||||
case QEMU_OPTION_hdc:
|
case QEMU_OPTION_hdc:
|
||||||
case QEMU_OPTION_hdd:
|
case QEMU_OPTION_hdd:
|
||||||
|
@ -3271,70 +3253,6 @@ int main(int argc, char **argv, char **envp)
|
||||||
case QEMU_OPTION_snapshot:
|
case QEMU_OPTION_snapshot:
|
||||||
snapshot = 1;
|
snapshot = 1;
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_hdachs:
|
|
||||||
{
|
|
||||||
const char *p;
|
|
||||||
p = optarg;
|
|
||||||
cyls = strtol(p, (char **)&p, 0);
|
|
||||||
if (cyls < 1 || cyls > 16383)
|
|
||||||
goto chs_fail;
|
|
||||||
if (*p != ',')
|
|
||||||
goto chs_fail;
|
|
||||||
p++;
|
|
||||||
heads = strtol(p, (char **)&p, 0);
|
|
||||||
if (heads < 1 || heads > 16)
|
|
||||||
goto chs_fail;
|
|
||||||
if (*p != ',')
|
|
||||||
goto chs_fail;
|
|
||||||
p++;
|
|
||||||
secs = strtol(p, (char **)&p, 0);
|
|
||||||
if (secs < 1 || secs > 63)
|
|
||||||
goto chs_fail;
|
|
||||||
if (*p == ',') {
|
|
||||||
p++;
|
|
||||||
if (!strcmp(p, "large")) {
|
|
||||||
translation = BIOS_ATA_TRANSLATION_LARGE;
|
|
||||||
} else if (!strcmp(p, "rechs")) {
|
|
||||||
translation = BIOS_ATA_TRANSLATION_RECHS;
|
|
||||||
} else if (!strcmp(p, "none")) {
|
|
||||||
translation = BIOS_ATA_TRANSLATION_NONE;
|
|
||||||
} else if (!strcmp(p, "lba")) {
|
|
||||||
translation = BIOS_ATA_TRANSLATION_LBA;
|
|
||||||
} else if (!strcmp(p, "auto")) {
|
|
||||||
translation = BIOS_ATA_TRANSLATION_AUTO;
|
|
||||||
} else {
|
|
||||||
goto chs_fail;
|
|
||||||
}
|
|
||||||
} else if (*p != '\0') {
|
|
||||||
chs_fail:
|
|
||||||
error_report("invalid physical CHS format");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
if (hda_opts != NULL) {
|
|
||||||
qemu_opt_set_number(hda_opts, "cyls", cyls,
|
|
||||||
&error_abort);
|
|
||||||
qemu_opt_set_number(hda_opts, "heads", heads,
|
|
||||||
&error_abort);
|
|
||||||
qemu_opt_set_number(hda_opts, "secs", secs,
|
|
||||||
&error_abort);
|
|
||||||
if (translation == BIOS_ATA_TRANSLATION_LARGE) {
|
|
||||||
qemu_opt_set(hda_opts, "trans", "large",
|
|
||||||
&error_abort);
|
|
||||||
} else if (translation == BIOS_ATA_TRANSLATION_RECHS) {
|
|
||||||
qemu_opt_set(hda_opts, "trans", "rechs",
|
|
||||||
&error_abort);
|
|
||||||
} else if (translation == BIOS_ATA_TRANSLATION_LBA) {
|
|
||||||
qemu_opt_set(hda_opts, "trans", "lba",
|
|
||||||
&error_abort);
|
|
||||||
} else if (translation == BIOS_ATA_TRANSLATION_NONE) {
|
|
||||||
qemu_opt_set(hda_opts, "trans", "none",
|
|
||||||
&error_abort);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
error_report("'-hdachs' is deprecated, please use '-device"
|
|
||||||
" ide-hd,cyls=c,heads=h,secs=s,...' instead");
|
|
||||||
break;
|
|
||||||
case QEMU_OPTION_numa:
|
case QEMU_OPTION_numa:
|
||||||
opts = qemu_opts_parse_noisily(qemu_find_opts("numa"),
|
opts = qemu_opts_parse_noisily(qemu_find_opts("numa"),
|
||||||
optarg, true);
|
optarg, true);
|
||||||
|
|
Loading…
Reference in New Issue