coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
string.c File Reference
#include <assert.h>
#include <ctype.h>
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
Include dependency graph for string.c:

Go to the source code of this file.

Functions

char * strdup (const char *s)
 
char * strconcat (const char *s1, const char *s2)
 
size_t strnlen (const char *src, size_t max)
 
size_t strlen (const char *src)
 
char * strchr (const char *s, int c)
 
char * strrchr (const char *s, int c)
 Find a character in a string. More...
 
char * strncpy (char *to, const char *from, int count)
 
char * strcpy (char *dst, const char *src)
 
int strcmp (const char *s1, const char *s2)
 
int strncmp (const char *s1, const char *s2, int maxlen)
 
unsigned int skip_atoi (char **s)
 
int strspn (const char *str, const char *spn)
 
int strcspn (const char *str, const char *spn)
 
char * strstr (const char *haystack, const char *needle)
 
char * strtok_r (char *str, const char *delim, char **ptr)
 
char * strtok (char *str, const char *delim)
 
long atol (const char *str)
 

Function Documentation

◆ atol()

long atol ( const char *  str)

Definition at line 200 of file string.c.

References isdigit(), and strspn().

Referenced by init_frb2_wdt(), and vpd_get_int().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ skip_atoi()

unsigned int skip_atoi ( char **  s)

Definition at line 126 of file string.c.

References isdigit(), and s.

Referenced by cse_check_update_status(), dt_fixup_external(), and vtxprintf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ strchr()

char* strchr ( const char *  s,
int  c 
)

Definition at line 50 of file string.c.

References c, NULL, and s.

Referenced by dt_find_node_by_path(), dt_fixup_external(), and is_runtime_data().

Here is the caller graph for this function:

◆ strcmp()

◆ strconcat()

char* strconcat ( const char *  s1,
const char *  s2 
)

Definition at line 19 of file string.c.

References dead_code, ENV_RAMSTAGE, malloc(), memcpy(), and strlen().

Referenced by dl_oem_smbios_strings(), and smbios_mainboard_bios_version().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ strcpy()

char* strcpy ( char *  dst,
const char *  src 
)

◆ strcspn()

int strcspn ( const char *  str,
const char *  spn 
)

Definition at line 150 of file string.c.

Referenced by strtok_r().

Here is the caller graph for this function:

◆ strdup()

char* strdup ( const char *  s)

Definition at line 7 of file string.c.

References dead_code, ENV_RAMSTAGE, malloc(), memcpy(), s, and strlen().

Referenced by add_device_ref(), camera_fill_cio2(), dt_find_node(), dt_find_node_by_path(), dt_fix_symbols(), dt_set_bin_prop_by_path(), fit_add_compat_string(), and fw_cfg_smbios_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ strlen()

◆ strncmp()

int strncmp ( const char *  s1,
const char *  s2,
int  maxlen 
)

◆ strncpy()

◆ strnlen()

size_t strnlen ( const char *  src,
size_t  max 
)

Definition at line 34 of file string.c.

Referenced by cmos_get_uint_option(), dt_check_compat_match(), find_image_with_overlays(), load_cached_fpf(), trim_trailing_whitespace(), and vtxprintf().

Here is the caller graph for this function:

◆ strrchr()

char* strrchr ( const char *  s,
int  c 
)

Find a character in a string.

Parameters
sThe string.
cThe character.
Returns
A pointer to the last occurrence of the character in the string, or NULL if the character was not encountered within the string.

Definition at line 60 of file string.c.

References c, NULL, and s.

Referenced by dt_set_bin_prop_by_path().

Here is the caller graph for this function:

◆ strspn()

int strspn ( const char *  str,
const char *  spn 
)

Definition at line 135 of file string.c.

Referenced by atol(), and strtok_r().

Here is the caller graph for this function:

◆ strstr()

char* strstr ( const char *  haystack,
const char *  needle 
)

Definition at line 165 of file string.c.

References NULL, strlen(), and strncmp().

Here is the call graph for this function:

◆ strtok()

char* strtok ( char *  str,
const char *  delim 
)

Definition at line 193 of file string.c.

References strtok_r().

Here is the call graph for this function:

◆ strtok_r()

char* strtok_r ( char *  str,
const char *  delim,
char **  ptr 
)

Definition at line 175 of file string.c.

References NULL, strcspn(), and strspn().

Referenced by strtok().

Here is the call graph for this function:
Here is the caller graph for this function: