Crinit -- Configurable Rootfs Init
utest-file-series-stat-filter.h File Reference

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

#include <stdbool.h>
Include dependency graph for utest-file-series-stat-filter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool crinitStatFilter (const char *name, int baseDirFd, bool followLinks)
 
void crinitStatFilterTestSuccess (void **state)
 
void crinitStatFilterTestFstatatFail (void **state)
 
void crinitStatFilterTestSisregFail (void **state)
 

Function Documentation

◆ crinitStatFilter()

bool crinitStatFilter ( const char *  name,
int  baseDirFd,
bool  followLinks 
)

Filters out everything that is not a regular file (or a symlink to it, depending on settings).

Parameters
nameFilename of the file to be fed to the filter.
baseDirFdOpened file descriptor of the directory, the file in question resides.
followLinksIf symbolic links should be followed to its destination before filtering (true) or generally filtered out (false).
Returns
true if name refers to a regular file, false if not.

◆ crinitStatFilterTestFstatatFail()

void crinitStatFilterTestFstatatFail ( void **  state)

Unit test for crinitStatFilter(), fstatat fail.

◆ crinitStatFilterTestSisregFail()

void crinitStatFilterTestSisregFail ( void **  state)

Unit test for crinitStatFilter(), S_ISREG fail.

◆ crinitStatFilterTestSuccess()

void crinitStatFilterTestSuccess ( void **  state)

Unit test for crinitStatFilter(), successful execution.