return NULL;
linelen = 0;
- while (line[linelen] && !strchra((CHAR8 *) "\n\r", line[linelen]))
+ while (line[linelen] && !strchr8("\n\r", line[linelen]))
linelen++;
/* move pos to next line */
line[linelen] = '\0';
/* remove leading whitespace */
- while (strchra((CHAR8 *) " \t", *line)) {
+ while (strchr8(" \t", *line)) {
line++;
linelen--;
}
/* remove trailing whitespace */
- while (linelen > 0 && strchra((CHAR8 *) " \t", line[linelen - 1]))
+ while (linelen > 0 && strchr8(" \t", line[linelen - 1]))
linelen--;
line[linelen] = '\0';
/* split key/value */
value = line;
- while (*value && !strchra(sep, *value))
+ while (*value && !strchr8((char *) sep, *value))
value++;
if (*value == '\0')
continue;
*value = '\0';
value++;
- while (*value && strchra(sep, *value))
+ while (*value && strchr8((char *) sep, *value))
value++;
/* unquote */
return str;
}
-CHAR8 *strchra(const CHAR8 *s, CHAR8 c) {
- if (!s)
- return NULL;
-
- do {
- if (*s == c)
- return (CHAR8*) s;
- } while (*s++);
-
- return NULL;
-}
-
EFI_STATUS file_read(EFI_FILE *dir, const CHAR16 *name, UINTN off, UINTN size, CHAR8 **ret, UINTN *ret_size) {
_cleanup_(file_closep) EFI_FILE *handle = NULL;
_cleanup_freepool_ CHAR8 *buf = NULL;
EFI_STATUS efivar_get_uint64_le(const EFI_GUID *vendor, const CHAR16 *name, UINT64 *ret);
EFI_STATUS efivar_get_boolean_u8(const EFI_GUID *vendor, const CHAR16 *name, BOOLEAN *ret);
-CHAR8 *strchra(const CHAR8 *s, CHAR8 c);
CHAR16 *xstra_to_path(const CHAR8 *stra);
CHAR16 *xstra_to_str(const CHAR8 *stra);