MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cmdline_set_env

Function cmdline_set_env

freebsd/arm/arm/machdep_boot.c:150–168  ·  view source on GitHub ↗

Convert the U-Boot command line into FreeBSD kenv and boot options. */

Source from the content-addressed store, hash-verified

148
149/* Convert the U-Boot command line into FreeBSD kenv and boot options. */
150static void
151cmdline_set_env(char *cmdline, const char *guard)
152{
153 size_t guard_len;
154
155 /* Skip leading spaces. */
156 while (isspace(*cmdline))
157 cmdline++;
158
159 /* Test and remove guard. */
160 if (guard != NULL && guard[0] != '\0') {
161 guard_len = strlen(guard);
162 if (strncasecmp(cmdline, guard, guard_len) != 0)
163 return;
164 cmdline += guard_len;
165 }
166
167 boothowto |= boot_parse_cmdline(cmdline);
168}
169
170/*
171 * Called for armv6 and newer.

Callers 2

arm_parse_fdt_bootargsFunction · 0.70
linux_parse_boot_paramFunction · 0.70

Calls 3

isspaceFunction · 0.85
strncasecmpFunction · 0.85
boot_parse_cmdlineFunction · 0.85

Tested by

no test coverage detected