mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 00:06:59 +00:00
main: move print_mac_addreses to state structure
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
4e7ab66fd4
commit
e8e9d49ebb
4 changed files with 16 additions and 17 deletions
|
|
@ -321,6 +321,9 @@ static char parse_command_line_opts(struct conf_t *state, int argc, char **argv)
|
|||
output_format = default_format[0];
|
||||
}
|
||||
}
|
||||
if (output_format == 'X' || output_format == 'J') {
|
||||
state->print_mac_addreses = 1;
|
||||
}
|
||||
return output_format;
|
||||
}
|
||||
|
||||
|
|
@ -355,10 +358,7 @@ int main(int argc, char **argv)
|
|||
|
||||
/* Do the job */
|
||||
parse_config(&state, 1, state.dhcpdconf_file, state.shared_net_root);
|
||||
if (output_format == 'X' || output_format == 'J')
|
||||
parse_leases(&state, 1);
|
||||
else
|
||||
parse_leases(&state, 0);
|
||||
parse_leases(&state);
|
||||
prepare_data(&state);
|
||||
do_counting(&state);
|
||||
if (state.sorts != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue