Crinit -- Configurable Rootfs Init
mock-scandir.c File Reference

(2023-10-16, commit: 49337e0)

Implementation of a mock function for scandir(). More...

#include "mock-scandir.h"
#include "unit_test.h"
Include dependency graph for mock-scandir.c:

Functions

int __wrap_scandir (const char *dirp, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compar)(const struct dirent **, const struct dirent **))
 

Detailed Description

Implementation of a mock function for scandir().

Function Documentation

◆ __wrap_scandir()

int __wrap_scandir ( const char *  dirp,
struct dirent ***  namelist,
int(*)(const struct dirent *)  filter,
int(*)(const struct dirent **, const struct dirent **)  compar 
)

Mock function for scandir().

Checks that the right parameters are given and return a preset value.