Remove more deprecated options
cover Remove more deprecated options
These options are deprecated since at least two releases, and nobody complained. Time to remove them now.
(I'm sending these patches as a series since Paolo asked me to send a PULL request on my own for them ... but if one of the subsystems maintainers prefers to take the patches through their own tree instead, just let me know)
Thomas Huth (4):
Remove the deprecated -balloon option
Remove the deprecated -nodefconfig option
Remove the deprecated options -startdate, -localtime and -rtc-td-hack
net: Remove the deprecated -tftp, -bootp, -redir and -smb options
docs/interop/live-block-operations.rst | 4 +- docs/virtio-balloon-stats.txt | 6 +- include/net/net.h | 3 - include/net/slirp.h | 4 - net/slirp.c | 132 ++++++++------------------------- os-posix.c | 8 -- qemu-deprecated.texi | 56 -------------- qemu-options.hx | 36 +-------- vl.c | 132 ++++++--------------------------- 9 files changed, 58 insertions(+), 323 deletions(-)
Signature · 1 line
1.8.3.1
PATCH 1/4 Remove the deprecated -balloon option
The "-balloon" option has been replaced by "-device virtio-balloon". It's been marked as deprecated since two releases, and nobody complained, so let's remove it now.
--- docs/virtio-balloon-stats.txt | 6 +++--- qemu-deprecated.texi | 5 ----- qemu-options.hx | 10 ---------- vl.c | 36 ------------------------------------ 4 files changed, 3 insertions(+), 54 deletions(-)
docs/virtio-balloon-stats.txt +3 -3
@@ -61,9 +61,9 @@ It's also important to note the following: respond to the request the timer will never be re-armed, which has the same effect as disabling polling -Here are a few examples. QEMU is started with '-balloon virtio', which -generates '/machine/peripheral-anon/device[1]' as the QOM path for the -balloon device. +Here are a few examples. QEMU is started with '-device virtio-balloon', +which generates '/machine/peripheral-anon/device[1]' as the QOM path for +the balloon device. Enable polling with 2 seconds interval:
qemu-deprecated.texi +0 -5
@@ -86,11 +86,6 @@ enabled via the ``-machine usb=on'' argument. The ``-nodefconfig`` argument is a synonym for ``-no-user-config``. -@subsection -balloon (since 2.12.0) - -The @option{--balloon virtio} argument has been superseded by -@option{--device virtio-balloon}. - @subsection -fsdev handle (since 2.12.0) The ``handle'' fsdev backend does not support symlinks and causes the 9p
qemu-options.hx +0 -10
@@ -454,16 +454,6 @@ modprobe i810_audio clocking=48000 @end example ETEXI -DEF("balloon", HAS_ARG, QEMU_OPTION_balloon, - "-balloon virtio[,addr=str]\n" - " enable virtio balloon device (deprecated)\n", QEMU_ARCH_ALL) -STEXI -@item -balloon virtio[,addr=@var{addr}] -@findex -balloon -Enable virtio balloon device, optionally with PCI address @var{addr}. This -option is deprecated, use @option{-device virtio-balloon} instead. -ETEXI - DEF("device", HAS_ARG, QEMU_OPTION_device, "-device driver[,prop[=value][,...]]\n" " add device (based on driver)\n"
vl.c +0 -36
@@ -2127,36 +2127,6 @@ static void parse_display(const char *p) } } -static int balloon_parse (const char *arg) -{ -QemuOpts *opts; - -warn_report ("This option is deprecated. " -"Use '--device virtio-balloon' to enable the balloon device." ); - -if (strcmp (arg,"none" ) ==0 ) { -return 0 ; - } - -if (!strncmp (arg,"virtio" ,6 )) { -if (arg[6 ] ==',' ) { -/* have params -> parse them */ - opts =qemu_opts_parse_noisily (qemu_find_opts ("device" ), arg +7 , - false); -if (!opts) -return -1 ; - }else { -/* create empty opts */ - opts =qemu_opts_create (qemu_find_opts ("device" ),NULL ,0 , - &error_abort); - } -qemu_opt_set (opts,"driver" ,"virtio-balloon" , &error_abort); -return 0 ; - } - -return -1 ; -} -char *qemu_find_file (int type,const char *name) {int i;
@@ -3660,12 +3630,6 @@ int main(int argc, char **argv, char **envp)case QEMU_OPTION_no_hpet: no_hpet =1 ;break ; -case QEMU_OPTION_balloon: -if (balloon_parse (optarg) <0 ) { -error_report ("unknown -balloon argument %s" , optarg); -exit (1 ); - } -break ;case QEMU_OPTION_no_reboot: no_reboot =1 ;break ;
Signature · 1 line
1.8.3.1
PATCH 2/4 Remove the deprecated -nodefconfig option
In reply to Thomas HuthIt's the same as -no-user-config and marked as deprecated since three releases already. Time to remove it now.
--- docs/interop/live-block-operations.rst | 4 ++-- qemu-deprecated.texi | 4 ---- qemu-options.hx | 4 ++-- vl.c | 2 -- 4 files changed, 4 insertions(+), 10 deletions(-)
docs/interop/live-block-operations.rst +2 -2
@@ -129,7 +129,7 @@ To show some example invocations of command-line, we will use the following invocation of QEMU, with a QMP server running over UNIX socket:: - $ ./x86_64-softmmu/qemu-system-x86_64 -display none -nodefconfig \ + $ ./x86_64-softmmu/qemu-system-x86_64 -display none -no-user-config \ -M q35 -nodefaults -m 512 \ -blockdev node-name=node-A,driver=qcow2,file.driver=file,file.node-name=file,file.filename=./a.qcow2 \ -device virtio-blk,drive=node-A,id=virtio0 \
@@ -694,7 +694,7 @@ instance, with the following invocation. (As noted earlier, for simplicity's sake, the destination QEMU is started on the same host, but it could be located elsewhere):: - $ ./x86_64-softmmu/qemu-system-x86_64 -display none -nodefconfig \ + $ ./x86_64-softmmu/qemu-system-x86_64 -display none -no-user-config \ -M q35 -nodefaults -m 512 \ -blockdev node-name=node-TargetDisk,driver=qcow2,file.driver=file,file.node-name=file,file.filename=./target-disk.qcow2 \ -device virtio-blk,drive=node-TargetDisk,id=virtio0 \
qemu-deprecated.texi +0 -4
@@ -82,10 +82,6 @@ would automatically enable USB support on the machine type. If using the new syntax, USB support must be explicitly enabled via the ``-machine usb=on'' argument. -@subsection -nodefconfig (since 2.11.0) - -The ``-nodefconfig`` argument is a synonym for ``-no-user-config``. - @subsection -fsdev handle (since 2.12.0) The ``handle'' fsdev backend does not support symlinks and causes the 9p
qemu-options.hx +2 -2
@@ -3833,8 +3833,7 @@ Write device configuration to @var{file}. The @var{file} can be either filename command line and device configuration into file or dash @code{-}) character to print the output to stdout. This can be later used as input file for @code{-readconfig} option. ETEXI -HXCOMM Deprecated, same as -no-user-config -DEF("nodefconfig", 0, QEMU_OPTION_nodefconfig, "", QEMU_ARCH_ALL) + DEF("no-user-config", 0, QEMU_OPTION_nouserconfig, "-no-user-config\n" " do not load default user-provided config files at startup\n",
@@ -3845,6 +3844,7 @@ STEXI The @code{-no-user-config} option makes QEMU not load any of the user-provided config files on @var{sysconfdir}. ETEXI + DEF("trace", HAS_ARG, QEMU_OPTION_trace, "-trace [[enable=]<pattern>][,events=<file>][,file=<file>]\n" " specify tracing options\n",
vl.c +0 -2
@@ -2999,7 +2999,6 @@ int main(int argc, char **argv, char **envp) popt =lookup_opt (argc, argv, &optarg, &optind);switch (popt->index) { -case QEMU_OPTION_nodefconfig:case QEMU_OPTION_nouserconfig: userconfig = false;break ;
@@ -3927,7 +3926,6 @@ int main(int argc, char **argv, char **envp)case QEMU_OPTION_enable_sync_profile:qsp_enable ();break ; -case QEMU_OPTION_nodefconfig:case QEMU_OPTION_nouserconfig:/* Nothing to be parsed here. Especially, do not error out below. */ break ;
Signature · 1 line
1.8.3.1
PATCH 3/4 Remove the deprecated options -startdate, -localtime and -rtc-td-hack
In reply to Thomas HuthDeprecated since two releases, nobody complained, thus it's time to remove them now.
--- qemu-deprecated.texi | 13 --------- qemu-options.hx | 7 ----- vl.c | 76 +++++++++++++++------------------------------------- 3 files changed, 22 insertions(+), 74 deletions(-)
qemu-deprecated.texi +0 -13
@@ -96,19 +96,6 @@ The @code{--no-frame} argument works with SDL 1.2 only. The other user interfaces never implemented this in the first place. So this will be removed together with SDL 1.2 support. -@subsection -rtc-td-hack (since 2.12.0) - -The @code{-rtc-td-hack} option has been replaced by -@code{-rtc driftfix=slew}. - -@subsection -localtime (since 2.12.0) - -The @code{-localtime} option has been replaced by @code{-rtc base=localtime}. - -@subsection -startdate (since 2.12.0) - -The @code{-startdate} option has been replaced by @code{-rtc base=@var{date}}. - @subsection -virtioconsole (since 3.0.0) Option @option{-virtioconsole} has been replaced by
qemu-options.hx +0 -7
@@ -1711,9 +1711,6 @@ Windows 2000 is installed, you no longer need this option (this option slows down the IDE transfers). ETEXI -HXCOMM Deprecated by -rtc -DEF("rtc-td-hack", 0, QEMU_OPTION_rtc_td_hack, "", QEMU_ARCH_I386) - DEF("no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk, "-no-fd-bootchk disable boot signature checking for floppy disks\n", QEMU_ARCH_I386)
@@ -3471,10 +3468,6 @@ ETEXI HXCOMM Silently ignored for compatibility DEF("clock", HAS_ARG, QEMU_OPTION_clock, "", QEMU_ARCH_ALL) -HXCOMM Options deprecated by -rtc -DEF("localtime", 0, QEMU_OPTION_localtime, "", QEMU_ARCH_ALL) -DEF("startdate", HAS_ARG, QEMU_OPTION_startdate, "", QEMU_ARCH_ALL) - DEF("rtc", HAS_ARG, QEMU_OPTION_rtc, \ "-rtc [base=utc|localtime|date][,clock=host|rt|vm][,driftfix=none|slew]\n" \ " set the RTC base and clock, enable drift fix for clock ticks (x86 only)\n",
vl.c +22 -54
112 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 4/4 net: Remove the deprecated -tftp, -bootp, -redir and -smb options
In reply to Thomas HuthThese options likely do not work as expected as soon as the user tries to use more than one network interface at once. The parameters have been marked as deprecated since QEMU v2.6, so users had plenty of time to move their scripts to the new syntax. Time to remove the old parameters now.
--- include/net/net.h | 3 -- include/net/slirp.h | 4 -- net/slirp.c | 132 +++++++++++---------------------------------------- os-posix.c | 8 ---- qemu-deprecated.texi | 34 ------------- qemu-options.hx | 15 ------ vl.c | 18 ------- 7 files changed, 29 insertions(+), 185 deletions(-)
include/net/net.h +0 -3
@@ -201,9 +201,6 @@ extern NICInfo nd_table[MAX_NICS];extern const char *host_net_devices[];/* from net.c */ -extern const char *legacy_tftp_prefix; -extern const char *legacy_bootp_filename; -int net_client_parse (QemuOptsList *opts_list,const char *str);int net_init_clients (Error **errp);void net_check_clients (void );
include/net/slirp.h +0 -4
@@ -30,10 +30,6 @@void hmp_hostfwd_add (Monitor *mon,const QDict *qdict);void hmp_hostfwd_remove (Monitor *mon,const QDict *qdict); -int net_slirp_redir (const char *redir_str); - -int net_slirp_smb (const char *exported_dir); -void hmp_info_usernet (Monitor *mon,const QDict *qdict);#endif
net/slirp.c +29 -103
218 lines not on this page · raw message
os-posix.c +0 -8
@@ -168,14 +168,6 @@ static bool os_parse_runas_uid_gid(const char *optarg)int os_parse_cmd_args (int index,const char *optarg) {switch (index) { -#ifdef CONFIG_SLIRP -case QEMU_OPTION_smb: -error_report ("The -smb option is deprecated. " -"Please use '-netdev user,smb=...' instead." ); -if (net_slirp_smb (optarg) <0 ) -exit (1 ); -break ; -#endif case QEMU_OPTION_runas: user_pwd =getpwnam (optarg);if (user_pwd) {
qemu-deprecated.texi +0 -34
@@ -40,40 +40,6 @@ which is the default. The ``-no-kvm'' argument is now a synonym for setting ``-machine accel=tcg''. -@subsection -tftp (since 2.6.0) - -The ``-tftp /some/dir'' argument is replaced by either -``-netdev user,id=x,tftp=/some/dir '' (for pluggable NICs, accompanied -with ``-device ...,netdev=x''), or ``-nic user,tftp=/some/dir'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - -@subsection -bootp (since 2.6.0) - -The ``-bootp /some/file'' argument is replaced by either -``-netdev user,id=x,bootp=/some/file '' (for pluggable NICs, accompanied -with ``-device ...,netdev=x''), or ``-nic user,bootp=/some/file'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - -@subsection -redir (since 2.6.0) - -The ``-redir [tcp|udp]:hostport:[guestaddr]:guestport'' argument is -replaced by either -``-netdev user,id=x,hostfwd=[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport'' -(for pluggable NICs, accompanied with ``-device ...,netdev=x'') or -``-nic user,hostfwd=[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - -@subsection -smb (since 2.6.0) - -The ``-smb /some/dir'' argument is replaced by either -``-netdev user,id=x,smb=/some/dir '' (for pluggable NICs, accompanied -with ``-device ...,netdev=x''), or ``-nic user,smb=/some/dir'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - @subsection -usbdevice (since 2.10.0) The ``-usbdevice DEV'' argument is now a synonym for setting
qemu-options.hx +0 -15
@@ -1813,16 +1813,6 @@ STEXI @table @option ETEXI -HXCOMM Legacy slirp options (now moved to -net user): -#ifdef CONFIG_SLIRP -DEF("tftp", HAS_ARG, QEMU_OPTION_tftp, "", QEMU_ARCH_ALL) -DEF("bootp", HAS_ARG, QEMU_OPTION_bootp, "", QEMU_ARCH_ALL) -DEF("redir", HAS_ARG, QEMU_OPTION_redir, "", QEMU_ARCH_ALL) -#ifndef _WIN32 -DEF("smb", HAS_ARG, QEMU_OPTION_smb, "", QEMU_ARCH_ALL) -#endif -#endif - DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, #ifdef CONFIG_SLIRP "-netdev user,id=str[,ipv4[=on|off]][,net=addr[/mask]][,host=addr]\n"
@@ -2150,11 +2140,6 @@ qemu-system-i386 -nic 'user,id=n1,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10 @end table -Note: Legacy stand-alone options -tftp, -bootp, -smb and -redir are still -processed and applied to -net user. Mixing them with the new configuration -syntax gives undefined results. Their use for new applications is discouraged -as they will be removed from future versions. - @item -netdev tap,id=@var{id}[,fd=@var{h}][,ifname=@var{name}][,script=@var{file}][,downscript=@var{dfile}][,br=@var{bridge}][,helper=@var{helper}] Configure a host TAP network backend with ID @var{id}.
vl.c +0 -18
@@ -3168,24 +3168,6 @@ int main(int argc, char **argv, char **envp) }break ;#endif -#ifdef CONFIG_SLIRP -case QEMU_OPTION_tftp: -error_report ("The -tftp option is deprecated. " -"Please use '-netdev user,tftp=...' instead." ); - legacy_tftp_prefix = optarg; -break ; -case QEMU_OPTION_bootp: -error_report ("The -bootp option is deprecated. " -"Please use '-netdev user,bootfile=...' instead." ); - legacy_bootp_filename = optarg; -break ; -case QEMU_OPTION_redir: -error_report ("The -redir option is deprecated. " -"Please use '-netdev user,hostfwd=...' instead." ); -if (net_slirp_redir (optarg) <0 ) -exit (1 ); -break ; -#endif case QEMU_OPTION_bt:add_device_config (DEV_BT , optarg);break ;
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 4/4] net: Remove the deprecated -tftp, -bootp, -redir and -smb options
Quoted 4 lines · Thomas Huth
These options likely do not work as expected as soon as the user tries to use more than one network interface at once. The parameters have been marked as deprecated since QEMU v2.6, so users had plenty of time to move their scripts to the new syntax.
I still haven't changed my scripts, because the warning message if you use -redir still doesn't tell you what exactly the new syntax option equivalent is...
thanks
-- PMM
Re: [Qemu-devel] [PATCH 4/4] net: Remove the deprecated -tftp, -bootp, -redir and -smb options
Quoted 9 lines · Peter Maydell
Quoted 4 lines · Thomas Huth
These options likely do not work as expected as soon as the user tries to use more than one network interface at once. The parameters have been marked as deprecated since QEMU v2.6, so users had plenty of time to move their scripts to the new syntax.
I still haven't changed my scripts, because the warning message if you use -redir still doesn't tell you what exactly the new syntax option equivalent is...
Oh, c'mon, I explicitly updated the documentation after you've complained the last time:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=0065e915192cdf83c270
Just RTFM ;-)
Thomas
Re: [Qemu-devel] [PATCH 4/4] net: Remove the deprecated -tftp, -bootp, -redir and -smb options
In reply to Thomas HuthThomas Huth, le lun. 27 août 2018 16:54:12 +0200, a ecrit:
Quoted 7 lines
These options likely do not work as expected as soon as the user tries to use more than one network interface at once. The parameters have been marked as deprecated since QEMU v2.6, so users had plenty of time to move their scripts to the new syntax. Time to remove the old parameters now.
Signed-off-by Thomas Huth <[email protected]>
Quoted 400 lines
--- include/net/net.h | 3 -- include/net/slirp.h | 4 -- net/slirp.c | 132 +++++++++++---------------------------------------- os-posix.c | 8 ---- qemu-deprecated.texi | 34 ------------- qemu-options.hx | 15 ------ vl.c | 18 ------- 7 files changed, 29 insertions(+), 185 deletions(-)include/net/net.h +0
-3@@ -201,9 +201,6 @@ extern NICInfo nd_table[MAX_NICS];extern const char *host_net_devices[];/* from net.c */ -extern const char *legacy_tftp_prefix; -extern const char *legacy_bootp_filename; -int net_client_parse (QemuOptsList *opts_list,const char *str);int net_init_clients (Error **errp);void net_check_clients (void );include/net/slirp.h +0
-4@@ -30,10 +30,6 @@void hmp_hostfwd_add (Monitor *mon,const QDict *qdict);void hmp_hostfwd_remove (Monitor *mon,const QDict *qdict); -int net_slirp_redir (const char *redir_str); - -int net_slirp_smb (const char *exported_dir); -void hmp_info_usernet (Monitor *mon,const QDict *qdict);#endif net/slirp.c +29
-103@@ -67,13 +67,11 @@ static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)/* slirp network adapter */ #define SLIRP_CFG_HOSTFWD 1 -#define SLIRP_CFG_LEGACY 2struct slirp_config_str {struct slirp_config_str *next;int flags;char str[1024 ]; -int legacy_format; }; typedef struct SlirpState {@@ -87,19 +85,13 @@ typedef struct SlirpState { } SlirpState;static struct slirp_config_str *slirp_configs; -const char *legacy_tftp_prefix; -const char *legacy_bootp_filename; static QTAILQ_HEAD(slirp_stacks, SlirpState) slirp_stacks =QTAILQ_HEAD_INITIALIZER (slirp_stacks); -static int slirp_hostfwd (SlirpState *s,const char *redir_str, -int legacy_format,Error **errp); -static int slirp_guestfwd (SlirpState *s,const char *config_str, -int legacy_format,Error **errp); +static int slirp_hostfwd (SlirpState *s,const char *redir_str,Error **errp); +static int slirp_guestfwd (SlirpState *s,const char *config_str,Error **errp);#ifndef _WIN32 -static const char *legacy_smb_export; -static int slirp_smb (SlirpState *s,const char *exported_dir,struct in_addr vserver_addr,Error **errp);static void slirp_smb_cleanup (SlirpState *s);@@ -196,13 +188,6 @@ static int net_slirp_init(NetClientState *peer, const char *model,return -1 ; } -if (!tftp_export) { - tftp_export = legacy_tftp_prefix; - } -if (!bootfile) { - bootfile = legacy_bootp_filename; - } -if (vnetwork) {if (get_str_sep (buf,sizeof (buf), &vnetwork,'/' ) <0 ) {if (!inet_aton (vnetwork, &net)) {@@ -382,21 +367,16 @@ static int net_slirp_init(NetClientState *peer, const char *model,for (config = slirp_configs; config; config = config->next) {if (config->flags &SLIRP_CFG_HOSTFWD ) { -if (slirp_hostfwd (s, config->str, - config->flags &SLIRP_CFG_LEGACY , errp) <0 ) { +if (slirp_hostfwd (s, config->str, errp) <0 ) { goto error; } }else { -if (slirp_guestfwd (s, config->str, - config->flags &SLIRP_CFG_LEGACY , errp) <0 ) { +if (slirp_guestfwd (s, config->str, errp) <0 ) { goto error; } } }#ifndef _WIN32 -if (!smb_export) { - smb_export = legacy_smb_export; - }if (smb_export) {if (slirp_smb (s, smb_export, smbsrv, errp) <0 ) { goto error;@@ -506,8 +486,7 @@ void hmp_hostfwd_remove(Monitor *mon, const QDict *qdict)monitor_printf (mon,"invalid format\n" ); } -static int slirp_hostfwd (SlirpState *s,const char *redir_str, -int legacy_format,Error **errp) +static int slirp_hostfwd (SlirpState *s,const char *redir_str,Error **errp) {struct in_addr host_addr = { .s_addr =INADDR_ANY };struct in_addr guest_addr = { .s_addr =0 };@@ -532,18 +511,16 @@ static int slirp_hostfwd(SlirpState *s, const char *redir_str, goto fail_syntax; } -if (!legacy_format) { -if (get_str_sep (buf,sizeof (buf), &p,':' ) <0 ) { - fail_reason ="Missing : separator" ; - goto fail_syntax; - } -if (buf[0 ] !='\0' && !inet_aton (buf, &host_addr)) { - fail_reason ="Bad host address" ; - goto fail_syntax; - } +if (get_str_sep (buf,sizeof (buf), &p,':' ) <0 ) { + fail_reason ="Missing : separator" ; + goto fail_syntax; + } +if (buf[0 ] !='\0' && !inet_aton (buf, &host_addr)) { + fail_reason ="Bad host address" ; + goto fail_syntax; } -if (get_str_sep (buf,sizeof (buf), &p, legacy_format ?':' :'-' ) <0 ) { +if (get_str_sep (buf,sizeof (buf), &p,'-' ) <0 ) { fail_reason ="Bad host port separator" ; goto fail_syntax; }@@ -602,35 +579,13 @@ void hmp_hostfwd_add(Monitor *mon, const QDict *qdict) }if (s) {Error *err =NULL ; -if (slirp_hostfwd (s, redir_str,0 , &err) <0 ) { +if (slirp_hostfwd (s, redir_str, &err) <0 ) {error_report_err (err); } } } -int net_slirp_redir (const char *redir_str) -{ -struct slirp_config_str *config; -Error *err =NULL ; -int res; - -if (QTAILQ_EMPTY (&slirp_stacks)) { - config =g_malloc (sizeof (*config)); -pstrcpy (config->str,sizeof (config->str), redir_str); - config->flags =SLIRP_CFG_HOSTFWD |SLIRP_CFG_LEGACY ; - config->next = slirp_configs; - slirp_configs = config; -return 0 ; - } - - res =slirp_hostfwd (QTAILQ_FIRST (&slirp_stacks), redir_str,1 , &err); -if (res <0 ) { -error_report_err (err); - } -return res; -} -#ifndef _WIN32/* automatic user mode samba server configuration */ @@ -746,28 +701,6 @@ static int slirp_smb(SlirpState* s, const char *exported_dir,return 0 ; } -/* automatic user mode samba server configuration (legacy interface) */ -int net_slirp_smb (const char *exported_dir) -{ -struct in_addr vserver_addr = { .s_addr =0 }; - -if (legacy_smb_export) { -fprintf (stderr,"-smb given twice\n" ); -return -1 ; - } - legacy_smb_export = exported_dir; -if (!QTAILQ_EMPTY (&slirp_stacks)) { -Error *err =NULL ; -int res =slirp_smb (QTAILQ_FIRST (&slirp_stacks), exported_dir, - vserver_addr, &err); -if (res <0 ) { -error_report_err (err); - } -return res; - } -return 0 ; -} -#endif /* !defined(_WIN32) */ struct GuestFwd {@@ -789,8 +722,7 @@ static void guestfwd_read(void *opaque, const uint8_t *buf, int size)slirp_socket_recv (fwd->slirp, fwd->server, fwd->port, buf, size); } -static int slirp_guestfwd (SlirpState *s,const char *config_str, -int legacy_format,Error **errp) +static int slirp_guestfwd (SlirpState *s,const char *config_str,Error **errp) {struct in_addr server = { .s_addr =0 };struct GuestFwd *fwd;@@ -800,26 +732,20 @@ static int slirp_guestfwd(SlirpState *s, const char *config_str,int port; p = config_str; -if (legacy_format) { -if (get_str_sep (buf,sizeof (buf), &p,':' ) <0 ) { - goto fail_syntax; - } - }else { -if (get_str_sep (buf,sizeof (buf), &p,':' ) <0 ) { - goto fail_syntax; - } -if (strcmp (buf,"tcp" ) && buf[0 ] !='\0' ) { - goto fail_syntax; - } -if (get_str_sep (buf,sizeof (buf), &p,':' ) <0 ) { - goto fail_syntax; - } -if (buf[0 ] !='\0' && !inet_aton (buf, &server)) { - goto fail_syntax; - } -if (get_str_sep (buf,sizeof (buf), &p,'-' ) <0 ) { - goto fail_syntax; - } +if (get_str_sep (buf,sizeof (buf), &p,':' ) <0 ) { + goto fail_syntax; + } +if (strcmp (buf,"tcp" ) && buf[0 ] !='\0' ) { + goto fail_syntax; + } +if (get_str_sep (buf,sizeof (buf), &p,':' ) <0 ) { + goto fail_syntax; + } +if (buf[0 ] !='\0' && !inet_aton (buf, &server)) { + goto fail_syntax; + } +if (get_str_sep (buf,sizeof (buf), &p,'-' ) <0 ) { + goto fail_syntax; } port =strtol (buf, &end,10 );if (*end !='\0' || port <1 || port >65535 ) {os-posix.c +0
-8@@ -168,14 +168,6 @@ static bool os_parse_runas_uid_gid(const char *optarg)int os_parse_cmd_args (int index,const char *optarg) {switch (index) { -#ifdef CONFIG_SLIRP -case QEMU_OPTION_smb: -error_report ("The -smb option is deprecated. " -"Please use '-netdev user,smb=...' instead." ); -if (net_slirp_smb (optarg) <0 ) -exit (1 ); -break ; -#endif case QEMU_OPTION_runas: user_pwd =getpwnam (optarg);if (user_pwd) {qemu-deprecated.texi +0
-34@@ -40,40 +40,6 @@ which is the default. The ``-no-kvm'' argument is now a synonym for setting ``-machine accel=tcg''. -@subsection -tftp (since 2.6.0) - -The ``-tftp /some/dir'' argument is replaced by either -``-netdev user,id=x,tftp=/some/dir '' (for pluggable NICs, accompanied -with ``-device ...,netdev=x''), or ``-nic user,tftp=/some/dir'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - -@subsection -bootp (since 2.6.0) - -The ``-bootp /some/file'' argument is replaced by either -``-netdev user,id=x,bootp=/some/file '' (for pluggable NICs, accompanied -with ``-device ...,netdev=x''), or ``-nic user,bootp=/some/file'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - -@subsection -redir (since 2.6.0) - -The ``-redir [tcp|udp]:hostport:[guestaddr]:guestport'' argument is -replaced by either -``-netdev user,id=x,hostfwd=[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport'' -(for pluggable NICs, accompanied with ``-device ...,netdev=x'') or -``-nic user,hostfwd=[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - -@subsection -smb (since 2.6.0) - -The ``-smb /some/dir'' argument is replaced by either -``-netdev user,id=x,smb=/some/dir '' (for pluggable NICs, accompanied -with ``-device ...,netdev=x''), or ``-nic user,smb=/some/dir'' -(for embedded NICs). The new syntax allows different settings to be -provided per NIC. - @subsection -usbdevice (since 2.10.0) The ``-usbdevice DEV'' argument is now a synonym for settingqemu-options.hx +0
-15@@ -1813,16 +1813,6 @@ STEXI @table @option ETEXI -HXCOMM Legacy slirp options (now moved to -net user): -#ifdef CONFIG_SLIRP -DEF("tftp", HAS_ARG, QEMU_OPTION_tftp, "", QEMU_ARCH_ALL) -DEF("bootp", HAS_ARG, QEMU_OPTION_bootp, "", QEMU_ARCH_ALL) -DEF("redir", HAS_ARG, QEMU_OPTION_redir, "", QEMU_ARCH_ALL) -#ifndef _WIN32 -DEF("smb", HAS_ARG, QEMU_OPTION_smb, "", QEMU_ARCH_ALL) -#endif -#endif - DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, #ifdef CONFIG_SLIRP "-netdev user,id=str[,ipv4[=on|off]][,net=addr[/mask]][,host=addr]\n"@@ -2150,11 +2140,6 @@ qemu-system-i386 -nic 'user,id=n1,guestfwd=tcp:10.0.2.100:1234-cmd:netcat 10.10 @end table -Note: Legacy stand-alone options -tftp, -bootp, -smb and -redir are still -processed and applied to -net user. Mixing them with the new configuration -syntax gives undefined results. Their use for new applications is discouraged -as they will be removed from future versions. - @item -netdev tap,id=@var{id}[,fd=@var{h}][,ifname=@var{name}][,script=@var{file}][,downscript=@var{dfile}][,br=@var{bridge}][,helper=@var{helper}] Configure a host TAP network backend with ID @var{id}.vl.c +0
-18@@ -3168,24 +3168,6 @@ int main(int argc, char **argv, char **envp) }break ;#endif -#ifdef CONFIG_SLIRP -case QEMU_OPTION_tftp: -error_report ("The -tftp option is deprecated. " -"Please use '-netdev user,tftp=...' instead." ); - legacy_tftp_prefix = optarg; -break ; -case QEMU_OPTION_bootp: -error_report ("The -bootp option is deprecated. " -"Please use '-netdev user,bootfile=...' instead." ); - legacy_bootp_filename = optarg; -break ; -case QEMU_OPTION_redir: -error_report ("The -redir option is deprecated. " -"Please use '-netdev user,hostfwd=...' instead." ); -if (net_slirp_redir (optarg) <0 ) -exit (1 ); -break ; -#endif case QEMU_OPTION_bt:add_device_config (DEV_BT , optarg);break ;Signature · 1 line
1.8.3.1
Signature · 2 lines
Samuel "c'est pas nous qui sommes à la rue, c'est la rue qui est à nous"
Quoted 8 lines · Thomas Huth
These options are deprecated since at least two releases, and nobody complained. Time to remove them now.
(I'm sending these patches as a series since Paolo asked me to send a PULL request on my own for them ... but if one of the subsystems maintainers prefers to take the patches through their own tree instead, just let me know)
Quoted 5 lines
Thomas Huth (4):
Remove the deprecated -balloon option
Remove the deprecated -nodefconfig option
Remove the deprecated options -startdate, -localtime and -rtc-td-hack
net: Remove the deprecated -tftp, -bootp, -redir and -smb options
Libvirt does not use any of the options above thankfully so a weak-ACK from the libvirt side.
Quoted 9 lines · Peter Krempa
Quoted 8 lines · Thomas Huth
These options are deprecated since at least two releases, and nobody complained. Time to remove them now.
(I'm sending these patches as a series since Paolo asked me to send a PULL request on my own for them ... but if one of the subsystems maintainers prefers to take the patches through their own tree instead, just let me know)
Quoted 8 lines
Quoted 5 lines
Thomas Huth (4):
Remove the deprecated -balloon option
Remove the deprecated -nodefconfig option
Remove the deprecated options -startdate, -localtime and -rtc-td-hack
net: Remove the deprecated -tftp, -bootp, -redir and -smb optionsLibvirt does not use any of the options above thankfully so a weak-ACK from the libvirt side.
And another:
ACK yeah!
from the libvirt side.
Jano