/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
*/ #include <linux/init.h> #include <linux/kernel.h> #include <linux/string.h>
#include <asm/addrspace.h> #include <asm/fw/fw.h>
int fw_argc; int *_fw_argv; int *_fw_envp;
#ifndef CONFIG_HAVE_PLAT_FW_INIT_CMDLINE void __init fw_init_cmdline(void)
{ int i;
for (i = 1; i < fw_argc; i++) {
strlcat(arcs_cmdline, fw_argv(i), COMMAND_LINE_SIZE); if (i < (fw_argc - 1))
strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
}
} #endif
if (_fw_envp != NULL && fw_envp(0) != NULL) { /* * Return a pointer to the given environment variable. * YAMON uses "name", "value" pairs, while U-Boot uses * "name=value".
*/ int i, yamon, index = 0;
yamon = (strchr(fw_envp(index), '=') == NULL);
i = strlen(envname);
while (fw_envp(index)) { if (strncmp(envname, fw_envp(index), i) == 0) { if (yamon) {
result = fw_envp(index + 1); break;
} elseif (fw_envp(index)[i] == '=') {
result = fw_envp(index) + i + 1; break;
}
}
/* Increment array index. */ if (yamon)
index += 2; else
index += 1;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.