Re: [PATCH v18 03/14] net/tap: deprecate "no" as special value for script/downscript
Markus Armbruster <[email protected]>
| Newsgroups | org.nongnu.qemu-riscv,org.nongnu.qemu-devel,org.xenproject.lists.xen-devel |
|---|---|
| Message-ID | <[email protected]> |
Vladimir Sementsov-Ogievskiy <[email protected]> writes: > The interface is ambiguous, as "no" is valid file name. So, > using "no" as a special value to disable script is deprecated. > Use an empty string ("script=" / "downscript=") instead. > > In a future version, "no" will be treated as a plain file name, just > like any other non-empty value. > > Document the deprecation in docs/about/deprecated.rst, qapi/net.json, > and qemu-options.hx. Update other docs to use empty string instead of > "no". Add a warning. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]> [...] > diff --git a/net/tap.c b/net/tap.c > index fedd48c48d2..1ec9e5ebe6f 100644 > --- a/net/tap.c > +++ b/net/tap.c > @@ -103,6 +103,8 @@ static bool tap_is_explicit_no_script(const char *script_arg) > } > > if (strcmp(script_arg, "no") == 0) { > + warn_report("script=no/downscript=no is deprecated; " > + "use script=/downscript= instead"); net_init_tap() could pass the parameter name for a simpler error message. Probably not worth the bother. > return true; > } > In net_init_tap_one(): qemu_set_info_str(&s->nc, "ifname=%s,script=%s,downscript=%s", ifname, script ?: "no", downscript ?: "no"); This sets nc->info_str, which is shown by "info network". Should we replace "no" by ""? [...]