summaryrefslogtreecommitdiff
path: root/fs/btrfs/btrfs.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-05-03 07:30:55 -0400
committerTom Rini <trini@konsulko.com>2019-05-03 07:30:55 -0400
commitb362fe0848df60569bdb867b7627151747eb6e23 (patch)
tree0c520eed4b77f93e2f1ad872db8445ca0e859ead /fs/btrfs/btrfs.c
parent6e25cfe9a475e8177bad7d9f97cffead6aab6b0d (diff)
parentcd22e34c11e7211c54d31f854672fa26185990a5 (diff)
Merge branch '2019-05-03-master-imports'
- Various btrfs fixes - Various TI platform fixes - Other fixes (cross build, taurus update, Kconfig help text)
Diffstat (limited to 'fs/btrfs/btrfs.c')
-rw-r--r--fs/btrfs/btrfs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c
index 6f35854823..cb7e182742 100644
--- a/fs/btrfs/btrfs.c
+++ b/fs/btrfs/btrfs.c
@@ -119,17 +119,17 @@ int btrfs_ls(const char *path)
if (inr == -1ULL) {
printf("Cannot lookup path %s\n", path);
- return 1;
+ return -1;
}
if (type != BTRFS_FT_DIR) {
printf("Not a directory: %s\n", path);
- return 1;
+ return -1;
}
if (btrfs_readdir(&root, inr, readdir_callback)) {
printf("An error occured while listing directory %s\n", path);
- return 1;
+ return -1;
}
return 0;
@@ -158,12 +158,12 @@ int btrfs_size(const char *file, loff_t *size)
if (inr == -1ULL) {
printf("Cannot lookup file %s\n", file);
- return 1;
+ return -1;
}
if (type != BTRFS_FT_REG_FILE) {
printf("Not a regular file: %s\n", file);
- return 1;
+ return -1;
}
*size = inode.size;
@@ -183,12 +183,12 @@ int btrfs_read(const char *file, void *buf, loff_t offset, loff_t len,
if (inr == -1ULL) {
printf("Cannot lookup file %s\n", file);
- return 1;
+ return -1;
}
if (type != BTRFS_FT_REG_FILE) {
printf("Not a regular file: %s\n", file);
- return 1;
+ return -1;
}
if (!len)
@@ -200,7 +200,7 @@ int btrfs_read(const char *file, void *buf, loff_t offset, loff_t len,
rd = btrfs_file_read(&root, inr, offset, len, buf);
if (rd == -1ULL) {
printf("An error occured while reading file %s\n", file);
- return 1;
+ return -1;
}
*actread = rd;