From 274ce6cce1eaa9033dee0050700f0ca9c2b5afdd Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 5 Jun 2021 16:48:06 +0200 Subject: 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 --- networking/udhcp/dhcpc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'networking') diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index f388003..4e3d8ca 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c @@ -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); -- cgit v1.1