Skip to content

Commit

Permalink
Make netplan_netdef_get_keep_configuration() public
Browse files Browse the repository at this point in the history
  • Loading branch information
chr4 committed Sep 19, 2023
1 parent 3d98105 commit 914a7df
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions abi-compat/jammy_0.107.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<elf-symbol name='_netplan_iter_defs_per_devtype_next' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='_netplan_nameserver_iter_free' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='_netplan_nameserver_iter_next' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='_netplan_netdef_get_keep_configuration' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='_netplan_netdef_get_delay_vf_rebind' type='func-type' binding='global-binding' visibility='default-visibility' alias='netplan_netdef_get_delay_virtual_functions_rebind' is-defined='yes'/>
<elf-symbol name='_netplan_netdef_get_embedded_switch_mode' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='_netplan_netdef_get_optional' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
Expand Down Expand Up @@ -59,6 +58,7 @@
<elf-symbol name='netplan_get_global_backend' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='netplan_get_id_from_nm_filename' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='netplan_get_id_from_nm_filepath' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='netplan_netdef_get_keep_configuration' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='netplan_netdef_get_backend' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='netplan_netdef_get_bond_link' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='netplan_netdef_get_bridge_link' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
Expand Down Expand Up @@ -4191,10 +4191,6 @@
<parameter type-id='type-id-181' name='netdef' filepath='../src/types.c' line='590' column='1'/>
<return type-id='type-id-44'/>
</function-decl>
<function-decl name='_netplan_netdef_get_keep_configuration' mangled-name='_netplan_netdef_get_keep_configuration' filepath='../src/types.c' line='597' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_netplan_netdef_get_keep_configuration'>
<parameter type-id='type-id-181' name='netdef' filepath='../src/types.c' line='597' column='1'/>
<return type-id='type-id-43'/>
</function-decl>
<function-decl name='_netplan_netdef_get_optional' mangled-name='_netplan_netdef_get_optional' filepath='../src/types.c' line='604' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_netplan_netdef_get_optional'>
<parameter type-id='type-id-181' name='netdef' filepath='../src/types.c' line='604' column='1'/>
<return type-id='type-id-42'/>
Expand Down Expand Up @@ -4373,6 +4369,10 @@
<parameter type-id='type-id-106' name='rootdir' filepath='../src/util.c' line='590' column='1'/>
<return type-id='type-id-42'/>
</function-decl>
<function-decl name='netplan_netdef_get_keep_configuration' mangled-name='netplan_netdef_get_keep_configuration' filepath='../src/types.c' line='597' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='netplan_netdef_get_keep_configuration'>
<parameter type-id='type-id-181' name='netdef' filepath='../src/types.c' line='597' column='1'/>
<return type-id='type-id-43'/>
</function-decl>
<function-decl name='netplan_netdef_get_output_filename' mangled-name='netplan_netdef_get_output_filename' filepath='../src/util.c' line='645' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='netplan_netdef_get_output_filename'>
<parameter type-id='type-id-181' name='netdef' filepath='../src/util.c' line='645' column='1'/>
<parameter type-id='type-id-106' name='ssid' filepath='../src/util.c' line='645' column='1'/>
Expand Down
3 changes: 3 additions & 0 deletions include/netplan.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ netplan_netdef_get_vlan_link(const NetplanNetDefinition* netdef);
NETPLAN_PUBLIC NetplanNetDefinition*
netplan_netdef_get_sriov_link(const NetplanNetDefinition* netdef);

NETPLAN_PUBLIC char *
netplan_netdef_get_keep_configuration(const NetplanNetDefinition* netdef);

NETPLAN_PUBLIC ssize_t
netplan_netdef_get_set_name(const NetplanNetDefinition* netdef, char* out_buffer, size_t out_buffer_size);

Expand Down
2 changes: 1 addition & 1 deletion python-cffi/netplan/_build_cffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
ssize_t _netplan_netdef_get_embedded_switch_mode(const NetplanNetDefinition* netdef, char* out_buffer, size_t out_buf_size);
gboolean _netplan_netdef_get_sriov_vlan_filter(const NetplanNetDefinition* netdef);
guint _netplan_netdef_get_vlan_id(const NetplanNetDefinition* netdef);
char* _netplan_netdef_get_keep_configuration(const NetplanNetDefinition* netdef);
char* netplan_netdef_get_keep_configuration(const NetplanNetDefinition* netdef);
gboolean _netplan_netdef_is_trivial_compound_itf(const NetplanNetDefinition* netdef);
int _netplan_state_get_vf_count_for_def(
const NetplanState* np_state, const NetplanNetDefinition* netdef, NetplanError** error);
Expand Down
7 changes: 0 additions & 7 deletions src/types.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,13 +594,6 @@ _netplan_netdef_get_vlan_id(const NetplanNetDefinition* netdef)
return netdef->vlan_id;
}

char *
_netplan_netdef_get_keep_configuration(const NetplanNetDefinition* netdef)
{
g_assert(netdef);
return netdef->keep_configuration;
}

gboolean
_netplan_netdef_get_optional(const NetplanNetDefinition* netdef)
{
Expand Down
3 changes: 0 additions & 3 deletions src/util-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ _netplan_state_get_vf_count_for_def(const NetplanState* np_state, const NetplanN
NETPLAN_INTERNAL gboolean
_netplan_netdef_get_sriov_vlan_filter(const NetplanNetDefinition* netdef);

NETPLAN_INTERNAL char *
_netplan_netdef_get_keep_configuration(const NetplanNetDefinition* netdef);

NETPLAN_INTERNAL gboolean
_netplan_netdef_get_optional(const NetplanNetDefinition* netdef);

Expand Down
7 changes: 7 additions & 0 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,13 @@ netplan_netdef_match_interface(const NetplanNetDefinition* netdef, const char* n
return TRUE;
}

char *
netplan_netdef_get_keep_configuration(const NetplanNetDefinition* netdef)
{
g_assert(netdef);
return netdef->keep_configuration;
}

ssize_t
netplan_netdef_get_set_name(const NetplanNetDefinition* netdef, char* out_buffer, size_t out_buf_size)
{
Expand Down

0 comments on commit 914a7df

Please sign in to comment.