Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
mock-strlen.h File Reference

(/usr/bin/git 2025-08-01, commit: e46fc091)

Header declaring a mock function for strlen(). More...

#include <stdbool.h>
#include <string.h>
Include dependency graph for mock-strlen.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

size_t __wrap_strlen (const char *s)
 
size_t __real_strlen (const char *s)
 

Variables

bool crinitMockStrlenEnabled
 

Detailed Description

Header declaring a mock function for strlen().

Function Documentation

◆ __real_strlen()

size_t __real_strlen ( const char *  s)

◆ __wrap_strlen()

size_t __wrap_strlen ( const char *  s)

Mock function for strlen().

If crinitMockStrlenEnabled is true then it checks that the right parameters are given and returns a preset value. If crinitMockStrlenEnabled is false then the call is forwarded to the genuine strlen method.

Variable Documentation

◆ crinitMockStrlenEnabled

bool crinitMockStrlenEnabled
extern