4 * Generic PROM routines
6 * Copyright (C) 2007 OpenWrt.org
7 * Copyright (C) 2007 Gabor Juhos <juhosg@freemail.hu>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
25 #include <linux/kernel.h>
26 #include <linux/init.h>
27 #include <linux/string.h>
29 #include <asm/bootinfo.h>
31 #include <prom/generic.h>
33 static int *_prom_argc
;
34 static char **_prom_argv
;
35 static char **_prom_envp
;
37 char *generic_prom_getenv(char *envname
)
43 for (env
= _prom_envp
; *env
!= NULL
; env
++) {
44 if (strcmp(envname
, *env
++) == 0) {
53 int generic_prom_present(void)
55 _prom_argc
= (int *)fw_arg0
;
56 _prom_argv
= (char **)fw_arg1
;
57 _prom_envp
= (char **)fw_arg2
;
This page took 0.048534 seconds and 5 git commands to generate.