]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/env_fat.c
Merge branch 'master' of git://git.denx.de/u-boot-net
[people/ms/u-boot.git] / common / env_fat.c
index 8db0160ceb0ced4fc703a2a11840d5e6bedde30d..d79d864a0c1216ee0e66a216b94d80a59e62de28 100644 (file)
@@ -13,6 +13,7 @@
 #include <environment.h>
 #include <linux/stddef.h>
 #include <malloc.h>
+#include <memalign.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;
+       loff_t size;
 
        err = env_export(&env_new);
        if (err)
@@ -59,7 +61,8 @@ int saveenv(void)
                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);