projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sbc8641d: increase monitor size from 256k to 384k
[oweals/u-boot.git]
/
common
/
env_fat.c
diff --git
a/common/env_fat.c
b/common/env_fat.c
index 328c09d45ff4c9b6b5120908bfb8ca9825ac67da..d79d864a0c1216ee0e66a216b94d80a59e62de28 100644
(file)
--- a/
common/env_fat.c
+++ b/
common/env_fat.c
@@
-13,6
+13,7
@@
#include <environment.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <environment.h>
#include <linux/stddef.h>
#include <malloc.h>
+#include <memalign.h>
#include <search.h>
#include <errno.h>
#include <fat.h>
#include <search.h>
#include <errno.h>
#include <fat.h>
@@
-41,6
+42,7
@@
int saveenv(void)
disk_partition_t info;
int dev, part;
int err;
disk_partition_t info;
int dev, part;
int err;
+ loff_t size;
err = env_export(&env_new);
if (err)
err = env_export(&env_new);
if (err)
@@
-59,7
+61,8
@@
int saveenv(void)
return 1;
}
return 1;
}
- err = file_fat_write(FAT_ENV_FILE, (void *)&env_new, sizeof(env_t));
+ err = file_fat_write(FAT_ENV_FILE, (void *)&env_new, 0, sizeof(env_t),
+ &size);
if (err == -1) {
printf("\n** Unable to write \"%s\" from %s%d:%d **\n",
FAT_ENV_FILE, FAT_ENV_INTERFACE, dev, part);
if (err == -1) {
printf("\n** Unable to write \"%s\" from %s%d:%d **\n",
FAT_ENV_FILE, FAT_ENV_INTERFACE, dev, part);
@@
-73,7
+76,7
@@
int saveenv(void)
void env_relocate_spec(void)
{
void env_relocate_spec(void)
{
-
char buf[CONFIG_ENV_SIZE]
;
+
ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE)
;
block_dev_desc_t *dev_desc = NULL;
disk_partition_t info;
int dev, part;
block_dev_desc_t *dev_desc = NULL;
disk_partition_t info;
int dev, part;
@@
-92,7
+95,7
@@
void env_relocate_spec(void)
goto err_env_relocate;
}
goto err_env_relocate;
}
- err = file_fat_read(FAT_ENV_FILE,
(uchar *)&
buf, CONFIG_ENV_SIZE);
+ err = file_fat_read(FAT_ENV_FILE, buf, CONFIG_ENV_SIZE);
if (err == -1) {
printf("\n** Unable to read \"%s\" from %s%d:%d **\n",
FAT_ENV_FILE, FAT_ENV_INTERFACE, dev, part);
if (err == -1) {
printf("\n** Unable to read \"%s\" from %s%d:%d **\n",
FAT_ENV_FILE, FAT_ENV_INTERFACE, dev, part);