platform/tests: add nmtstp_kernel_support_get()

This commit is contained in:
Thomas Haller 2020-08-21 13:45:30 +02:00
parent 195b406ac0
commit 1407d29b5e
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 19 additions and 0 deletions

View file

@ -1980,6 +1980,23 @@ nmtstp_link_set_updown (NMPlatform *platform,
/*****************************************************************************/
gboolean
nmtstp_kernel_support_get (NMPlatformKernelSupportType type)
{
NMTernary v;
v = nm_platform_kernel_support_get_full (type, FALSE);
if (v != NM_TERNARY_DEFAULT)
return v != NM_TERNARY_FALSE;
switch (type) {
default:
g_assert_not_reached ();
}
}
/*****************************************************************************/
struct _NMTstpNamespaceHandle {
pid_t pid;
int pipe_fd;

View file

@ -318,6 +318,8 @@ gboolean nmtstp_platform_ip6_route_delete (NMPlatform *platform, int ifindex, st
const NMPlatformLink *nmtstp_link_get_typed (NMPlatform *platform, int ifindex, const char *name, NMLinkType link_type);
const NMPlatformLink *nmtstp_link_get (NMPlatform *platform, int ifindex, const char *name);
gboolean nmtstp_kernel_support_get (NMPlatformKernelSupportType type);
void nmtstp_link_set_updown (NMPlatform *platform,
gboolean external_command,
int ifindex,