Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27129
b: refs/heads/master
c: fef6d6a
h: refs/heads/master
i:
  27127: 22b087d
v: v3
  • Loading branch information
Sergei Shtylyov authored and Ralf Baechle committed Jun 5, 2006
1 parent 1943b44 commit 40121bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ebba0e2f56ee77270a9ef8e92c1b4ec38e5f419
refs/heads/master: fef6d6a73a3985e4fdb5ab1910909c0c73539829
24 changes: 9 additions & 15 deletions trunk/arch/mips/au1000/common/prom.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/*
*
* BRIEF MODULE DESCRIPTION
* PROM library initialisation code, assuming a version of
* pmon is the boot code.
* PROM library initialisation code, assuming YAMON is the boot loader.
*
* Copyright 2000,2001 MontaVista Software Inc.
* Copyright 2000, 2001, 2006 MontaVista Software Inc.
* Author: MontaVista Software, Inc.
* ppopov@mvista.com or source@mvista.com
*
Expand Down Expand Up @@ -49,9 +48,9 @@ extern char **prom_argv, **prom_envp;

typedef struct
{
char *name;
/* char *val; */
}t_env_var;
char *name;
char *val;
} t_env_var;


char * prom_getcmdline(void)
Expand Down Expand Up @@ -85,21 +84,16 @@ char *prom_getenv(char *envname)
{
/*
* Return a pointer to the given environment variable.
* Environment variables are stored in the form of "memsize=64".
*/

t_env_var *env = (t_env_var *)prom_envp;
int i;

i = strlen(envname);

while(env->name) {
if(strncmp(envname, env->name, i) == 0) {
return(env->name + strlen(envname) + 1);
}
while (env->name) {
if (strcmp(envname, env->name) == 0)
return env->val;
env++;
}
return(NULL);
return NULL;
}

inline unsigned char str2hexnum(unsigned char c)
Expand Down

0 comments on commit 40121bf

Please sign in to comment.