diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-08-07 22:30:12 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-08-07 22:30:12 +0000 |
commit | fa02b6c239469325e594386f472546a89dae5878 (patch) | |
tree | ddcf2ef9af85071f7b1b4a53ffffc957d7216dbc /firmware/eeprom_settings.c | |
parent | c9d66562afc15de210854b32f30976859bce2023 (diff) |
Let eeprom driver return the error number. This is just a cover-up commit to hide the fact that I broke the eeprom dump in my previous commit. Some code cleanup as bonus.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10480 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/eeprom_settings.c')
-rw-r--r-- | firmware/eeprom_settings.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/eeprom_settings.c b/firmware/eeprom_settings.c index 43f519d3fa..e472f4df07 100644 --- a/firmware/eeprom_settings.c +++ b/firmware/eeprom_settings.c @@ -37,7 +37,7 @@ static void reset_config(void) bool eeprom_settings_init(void) { - bool ret; + int ret; uint32_t sum; eeprom_24cxx_init(); @@ -54,7 +54,7 @@ bool eeprom_settings_init(void) ret = eeprom_24cxx_read(0, &firmware_settings, sizeof(struct eeprom_settings)); - if (!ret) + if (ret < 0) { memset(&firmware_settings, 0, sizeof(struct eeprom_settings)); firmware_settings.initialized = false; @@ -92,7 +92,7 @@ bool eeprom_settings_init(void) bool eeprom_settings_store(void) { - bool ret; + int ret; uint32_t sum; if (!firmware_settings.initialized || !detect_flashed_rockbox()) @@ -108,7 +108,7 @@ bool eeprom_settings_store(void) ret = eeprom_24cxx_write(0, &firmware_settings, sizeof(struct eeprom_settings)); - if (!ret) + if (ret < 0) firmware_settings.initialized = false; return ret; |