core: add device_table parameter to device table functions

Instead of accessing the global device table directly, add a parameter
to all device-table accessing functions. This makes all places in
the code that access the global device table grep-able, which is
necessary to include the device-table code in the undo system.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-10-10 21:41:36 +02:00 committed by Dirk Hohndel
parent 7b06349be5
commit 8549f24c91
9 changed files with 31 additions and 29 deletions

View file

@ -201,7 +201,7 @@ void dc_settings_start(struct parser_state *state)
void dc_settings_end(struct parser_state *state)
{
create_device_node(state->cur_settings.dc.model, state->cur_settings.dc.deviceid, state->cur_settings.dc.serial_nr,
create_device_node(&device_table, state->cur_settings.dc.model, state->cur_settings.dc.deviceid, state->cur_settings.dc.serial_nr,
state->cur_settings.dc.firmware, state->cur_settings.dc.nickname);
reset_dc_settings(state);
}