Skip to content

Commit ff46197

Browse files
Merge pull request #1347 from jan-cerny/is_local_fs_static
Make is_local_fs static again
2 parents 3b0b938 + 535c487 commit ff46197

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

src/OVAL/probes/fsdev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static int fsdev_cmp(const void *a, const void *b)
7979
#define DEVID_ARRAY_ADD 8
8080

8181
#if defined(__linux__)
82-
int is_local_fs(struct mntent *ment)
82+
static int is_local_fs(struct mntent *ment)
8383
{
8484
// todo: would it be usefull to provide the choice during build-time?
8585
#if 1
@@ -129,7 +129,7 @@ int is_local_fs(struct mntent *ment)
129129
}
130130

131131
#elif defined(_AIX)
132-
int is_local_fs(struct mntent *ment)
132+
static int is_local_fs(struct mntent *ment)
133133
{
134134
int i;
135135
struct vfs_ent *e;

src/OVAL/probes/public/fsdev.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,5 @@ int fsdev_path(fsdev_t * lfs, const char *path);
8686
*/
8787
int fsdev_fd(fsdev_t * lfs, int fd);
8888

89-
#if defined(__linux__) || defined(_AIX)
90-
/**
91-
* Detemines whether a given mtab entry is a local file system.
92-
* @param ment Structure returned by getmntent (see `man 3 getmntent`).
93-
* @retval 1 if local
94-
* @retval 0 otherwise
95-
*/
96-
int is_local_fs(struct mntent *ment);
97-
#endif
98-
9989
#endif /* FSDEV_H */
10090
/// @}

tests/API/probes/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ AM_CPPFLAGS = \
55
-I$(top_srcdir)/src/CPE/public \
66
-I$(top_srcdir)/src/CVE/public \
77
-I${top_srcdir}/src/CVSS/public \
8-
-I$(top_srcdir)/src/OVAL/probes/SEAP/public \
8+
-I$(top_srcdir)/src/OVAL/probes \
99
-I$(top_srcdir)/src/OVAL/probes/public \
10+
-I$(top_srcdir)/src/OVAL/probes/SEAP/public \
1011
-I$(top_srcdir)/src/OVAL/public \
1112
-I$(top_srcdir)/src/XCCDF/public \
1213
-I$(top_srcdir)/src/common/public \

tests/API/probes/test_fsdev_is_local_fs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <string.h>
2929
#include <mntent.h>
3030
#include "fsdev.h"
31+
#include "fsdev.c"
3132

3233
static int test_single_call()
3334
{

0 commit comments

Comments
 (0)