udhcpc: revert deprecation message for -V
"-x vendor:VENDOR" will not be a trivial replacement of it:
(1) by default, we do send a vendor string ("udhcp BB_VER"),
will need code to preserve the default.
(2) -V '' currently disables vendor string. -x vendor:''
would not easily achieve that: it adds no option at all
(string options can't be empty), and default (1) would trigger.
To avoid that, we will need yet another hack to detect
-x vendor:'' and interpret that as "no vendor string at all".
IOW: removing -V is likely to increase code size, not decrease.
function old new delta
udhcpc_main 2563 2555 -8
.rodata 103251 103198 -53
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-61) Total: -61 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -1326,10 +1326,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
|
||||
}
|
||||
if (str_V[0] != '\0') {
|
||||
char *p;
|
||||
unsigned len;
|
||||
//msg added 2021-06
|
||||
bb_error_msg("option -V VENDOR is deprecated, use -x vendor:VENDOR");
|
||||
len = strlen(str_V);
|
||||
unsigned len = strnlen(str_V, 254);
|
||||
p = udhcp_insert_new_option(
|
||||
&client_data.options, DHCP_VENDOR,
|
||||
len, /*dhcp6:*/ 0);
|
||||
|
||||
Reference in New Issue
Block a user