Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360026
b: refs/heads/master
c: ee7e2f3
h: refs/heads/master
v: v3
  • Loading branch information
Hauke Mehrtens authored and John Crispin committed Feb 15, 2013
1 parent 57daaaf commit 4dce62c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 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: bb76563214ec371a461ca5038904a5b93dbd6b46
refs/heads/master: ee7e2f3c235f43d815c0be285101b5b91a3bcaa5
4 changes: 2 additions & 2 deletions trunk/arch/mips/bcm47xx/nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int nvram_getenv(char *name, char *val, size_t val_len)
char *var, *value, *end, *eq;

if (!name)
return NVRAM_ERR_INV_PARAM;
return -EINVAL;

if (!nvram_buf[0])
early_nvram_init();
Expand All @@ -143,6 +143,6 @@ int nvram_getenv(char *name, char *val, size_t val_len)
return snprintf(val, val_len, "%s", value);
}
}
return NVRAM_ERR_ENVNOTFOUND;
return -ENOENT;
}
EXPORT_SYMBOL(nvram_getenv);
2 changes: 1 addition & 1 deletion trunk/arch/mips/bcm47xx/sprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static int get_nvram_var(const char *prefix, const char *postfix,
create_key(prefix, postfix, name, key, sizeof(key));

err = nvram_getenv(key, buf, len);
if (fallback && err == NVRAM_ERR_ENVNOTFOUND && prefix) {
if (fallback && err == -ENOENT && prefix) {
create_key(NULL, postfix, name, key, sizeof(key));
err = nvram_getenv(key, buf, len);
}
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/mips/include/asm/mach-bcm47xx/nvram.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ struct nvram_header {
#define NVRAM_MAX_VALUE_LEN 255
#define NVRAM_MAX_PARAM_LEN 64

#define NVRAM_ERR_INV_PARAM -8
#define NVRAM_ERR_ENVNOTFOUND -9

extern int nvram_getenv(char *name, char *val, size_t val_len);

static inline void nvram_parse_macaddr(char *buf, u8 macaddr[6])
Expand Down

0 comments on commit 4dce62c

Please sign in to comment.