summaryrefslogtreecommitdiff
path: root/super-recover.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2016-09-26 12:54:26 +0800
committerDavid Sterba <dsterba@suse.com>2016-10-03 15:07:22 +0200
commit50c8c995eace63599ee956980b8e525fbe6a089b (patch)
treec589518722f0cc974b283e147fa59a947ccddf07 /super-recover.c
parent6bdb1cfbc1a3ab1f1fc2eb23daef777c17bd0b1a (diff)
btrfs-progs: Return more meaningful value for btrfs_read_deve_super
btrfs_read_dev_super() only returns 0 or -1, which doesn't really help, caller won't know if it's caused by bad superblock or superblock out of range. Return -errno if pread64() return -1, and return -EOF if none or part of the super is read out, and return what check_super() returned. So caller can get -EIO to catch real corrupted super blocks. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'super-recover.c')
0 files changed, 0 insertions, 0 deletions