platform: add nmp-object.h file
This commit is contained in:
@@ -227,6 +227,8 @@ nm_sources = \
|
||||
platform/nm-platform.h \
|
||||
platform/nm-platform-utils.c \
|
||||
platform/nm-platform-utils.h \
|
||||
platform/nmp-object.c \
|
||||
platform/nmp-object.h \
|
||||
platform/wifi/wifi-utils-nl80211.c \
|
||||
platform/wifi/wifi-utils-nl80211.h \
|
||||
platform/wifi/wifi-utils-private.h \
|
||||
@@ -475,6 +477,8 @@ libnm_iface_helper_la_SOURCES = \
|
||||
platform/nm-platform.h \
|
||||
platform/nm-platform-utils.c \
|
||||
platform/nm-platform-utils.h \
|
||||
platform/nmp-object.c \
|
||||
platform/nmp-object.h \
|
||||
platform/wifi/wifi-utils-nl80211.c \
|
||||
platform/wifi/wifi-utils-nl80211.h \
|
||||
platform/wifi/wifi-utils-private.h \
|
||||
|
23
src/platform/nmp-object.c
Normal file
23
src/platform/nmp-object.c
Normal file
@@ -0,0 +1,23 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/* nm-platform.c - Handle runtime kernel networking configuration
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2015 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nmp-object.h"
|
||||
|
||||
|
29
src/platform/nmp-object.h
Normal file
29
src/platform/nmp-object.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/* nm-platform.c - Handle runtime kernel networking configuration
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2015 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __NMP_OBJECT_H__
|
||||
#define __NMP_OBJECT_H__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "nm-platform.h"
|
||||
|
||||
|
||||
#endif /* __NMP_OBJECT_H__ */
|
2
src/platform/tests/.gitignore
vendored
2
src/platform/tests/.gitignore
vendored
@@ -8,5 +8,7 @@
|
||||
/test-general
|
||||
/test-link-fake
|
||||
/test-link-linux
|
||||
/test-nmp-object
|
||||
/test-route-fake
|
||||
/test-route-linux
|
||||
|
||||
|
@@ -38,6 +38,7 @@ noinst_PROGRAMS = \
|
||||
test-address-fake \
|
||||
test-address-linux \
|
||||
test-general \
|
||||
test-nmp-object \
|
||||
test-route-fake \
|
||||
test-route-linux \
|
||||
test-cleanup-fake \
|
||||
@@ -110,6 +111,11 @@ test_cleanup_linux_CPPFLAGS = \
|
||||
-DKERNEL_HACKS=1
|
||||
test_cleanup_linux_LDADD = $(PLATFORM_LDADD)
|
||||
|
||||
test_nmp_object_SOURCES = \
|
||||
test-nmp-object.c
|
||||
test_nmp_object_LDADD = \
|
||||
$(top_builddir)/src/libNetworkManager.la
|
||||
|
||||
test_general_SOURCES = \
|
||||
test-general.c
|
||||
test_general_LDADD = \
|
||||
@@ -125,6 +131,7 @@ TESTS = \
|
||||
test-general \
|
||||
test-link-fake \
|
||||
test-link-linux \
|
||||
test-nmp-object \
|
||||
test-route-fake \
|
||||
test-route-linux
|
||||
|
||||
|
43
src/platform/tests/test-nmp-object.c
Normal file
43
src/platform/tests/test-nmp-object.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/* nm-platform.c - Handle runtime kernel networking configuration
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Copyright (C) 2015 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nmp-object.h"
|
||||
|
||||
#include "nm-logging.h"
|
||||
|
||||
#include "nm-test-utils.h"
|
||||
|
||||
|
||||
/******************************************************************/
|
||||
|
||||
NMTST_DEFINE ();
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int result;
|
||||
|
||||
nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT");
|
||||
|
||||
result = g_test_run ();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user