arch/mips/fw/lib/cmdline.c
Source file repositories/reference/linux-study-clean/arch/mips/fw/lib/cmdline.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/fw/lib/cmdline.c- Extension
.c- Size
- 1987 bytes
- Lines
- 104
- Domain
- Architecture Layer
- Bucket
- arch/mips
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
Dependency Surface
linux/init.hlinux/kernel.hlinux/string.hasm/addrspace.hasm/fw/fw.h
Detected Declarations
function fw_init_cmdlinefunction fw_getcmdlinefunction fw_getenvl
Annotated Snippet
while (fw_envp(index)) {
if (strncmp(envname, fw_envp(index), i) == 0) {
if (yamon) {
result = fw_envp(index + 1);
break;
} else if (fw_envp(index)[i] == '=') {
result = fw_envp(index) + i + 1;
break;
}
}
/* Increment array index. */
if (yamon)
index += 2;
else
index += 1;
}
}
return result;
}
unsigned long fw_getenvl(char *envname)
{
unsigned long envl = 0UL;
char *str;
int tmp;
str = fw_getenv(envname);
if (str) {
tmp = kstrtoul(str, 0, &envl);
if (tmp)
envl = 0;
}
return envl;
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/string.h`, `asm/addrspace.h`, `asm/fw/fw.h`.
- Detected declarations: `function fw_init_cmdline`, `function fw_getcmdline`, `function fw_getenvl`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.