aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-06-05 16:48:06 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2021-06-05 17:06:35 +0200
commit274ce6cce1eaa9033dee0050700f0ca9c2b5afdd (patch)
treeeb24e0222ccc7fa4d5af54785f97e8ced916d681
parent5a72b0cd74d6de8ed39a9704798ce1118b0995f1 (diff)
downloadbusybox-w32-274ce6cce1eaa9033dee0050700f0ca9c2b5afdd.tar.gz
busybox-w32-274ce6cce1eaa9033dee0050700f0ca9c2b5afdd.tar.bz2
busybox-w32-274ce6cce1eaa9033dee0050700f0ca9c2b5afdd.zip
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>
-rw-r--r--networking/udhcp/dhcpc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index f388003a3..4e3d8ca5e 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1326,10 +1326,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1326 } 1326 }
1327 if (str_V[0] != '\0') { 1327 if (str_V[0] != '\0') {
1328 char *p; 1328 char *p;
1329 unsigned len; 1329 unsigned len = strnlen(str_V, 254);
1330 //msg added 2021-06
1331 bb_error_msg("option -V VENDOR is deprecated, use -x vendor:VENDOR");
1332 len = strlen(str_V);
1333 p = udhcp_insert_new_option( 1330 p = udhcp_insert_new_option(
1334 &client_data.options, DHCP_VENDOR, 1331 &client_data.options, DHCP_VENDOR,
1335 len, /*dhcp6:*/ 0); 1332 len, /*dhcp6:*/ 0);