diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/btrfs.c | 2 | ||||
-rw-r--r-- | fs/ext4/ext4fs.c | 4 | ||||
-rw-r--r-- | fs/fs.c | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c index 350cff0cbca..f3087f690fa 100644 --- a/fs/btrfs/btrfs.c +++ b/fs/btrfs/btrfs.c @@ -193,7 +193,7 @@ int btrfs_size(const char *file, loff_t *size) ret = btrfs_lookup_path(fs_info->fs_root, BTRFS_FIRST_FREE_OBJECTID, file, &root, &ino, &type, 40); if (ret < 0) { - printf("Cannot lookup file %s\n", file); + debug("Cannot lookup file %s\n", file); return ret; } if (type != BTRFS_FT_REG_FILE) { diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c index dfecfa0b4e8..1727da2dc6d 100644 --- a/fs/ext4/ext4fs.c +++ b/fs/ext4/ext4fs.c @@ -213,7 +213,7 @@ int ext4fs_opendir(const char *dirname, struct fs_dir_stream **dirsp) if (!dirs) return -ENOMEM; dirs->dirname = strdup(dirname); - if (!dirs) { + if (!dirs->dirname) { free(dirs); return -ENOMEM; } @@ -224,6 +224,8 @@ int ext4fs_opendir(const char *dirname, struct fs_dir_stream **dirsp) ret = 0; *dirsp = (struct fs_dir_stream *)dirs; } else { + free(dirs->dirname); + free(dirs); ret = -ENOENT; } @@ -23,6 +23,7 @@ #include <time.h> #include <ubifs_uboot.h> #include <btrfs.h> +#include <asm/cache.h> #include <asm/global_data.h> #include <asm/io.h> #include <div64.h> @@ -1001,6 +1002,9 @@ int fs_read_alloc(const char *fname, ulong size, uint align, void **bufp) char *buf; int ret; + if (!align) + align = ARCH_DMA_MINALIGN; + buf = memalign(align, size + 1); if (!buf) return log_msg_ret("buf", -ENOMEM); |