1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

fixed the -B option as well

This commit is contained in:
Andrew Tridgell -
parent 1d3c7e7fb6
commit 0c12a206bb

View File

@ -193,7 +193,7 @@ int main(int argc,char *argv[])
struct poptOption long_options[] = {
POPT_AUTOHELP
{ "broadcast", 'b', POPT_ARG_STRING, NULL, 'B', "Specify address to use for broadcasts", "BROADCAST-ADDRESS" },
{ "broadcast", 'B', POPT_ARG_STRING, NULL, 'B', "Specify address to use for broadcasts", "BROADCAST-ADDRESS" },
{ "flags", 'f', POPT_ARG_VAL, &give_flags, True, "List the NMB flags returned" },
{ "unicast", 'U', POPT_ARG_STRING, NULL, 'U', "Specify address to use for unicast" },
{ "master-browser", 'M', POPT_ARG_VAL, &find_master, True, "Search for a master browser" },
@ -216,9 +216,8 @@ int main(int argc,char *argv[])
poptSetOtherOptionHelp(pc, "<NODE> ...");
while ((opt = poptGetNextOpt(pc)) != -1)
switch (opt)
{
while ((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
case 'B':
bcast_addr = *interpret_addr2(poptGetOptArg(pc));
got_bcast = True;
@ -233,6 +232,7 @@ int main(int argc,char *argv[])
translate_addresses = !translate_addresses;
break;
}
}
poptGetArg(pc); /* Remove argv[0] */