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.

Dependency Surface

Detected Declarations

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

Implementation Notes