mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-16 00:34:32 +08:00
btrfs-progs: btrfs-select-super output is confusing when it fails
Trivial patch: ./btrfs-progs/btrfs-select-super -s 0 /dev/sdc using SB copy 0, bytenr 65536 No valid Btrfs found on /dev/sdc Open ctree failed The line 'using..' is confusing which gives an indication that command is successful This patch will avoid that when command fails Signed-off-by: Anand Jain <anand.jain@oracle.com>
This commit is contained in:
parent
4b3c9136be
commit
555ae67390
@ -43,7 +43,7 @@ int main(int ac, char **av)
|
||||
{
|
||||
struct btrfs_root *root;
|
||||
int ret;
|
||||
int num;
|
||||
int num = 0;
|
||||
u64 bytenr = 0;
|
||||
|
||||
while(1) {
|
||||
@ -55,8 +55,6 @@ int main(int ac, char **av)
|
||||
case 's':
|
||||
num = atol(optarg);
|
||||
bytenr = btrfs_sb_offset(num);
|
||||
printf("using SB copy %d, bytenr %llu\n", num,
|
||||
(unsigned long long)bytenr);
|
||||
break;
|
||||
default:
|
||||
print_usage();
|
||||
@ -97,5 +95,7 @@ int main(int ac, char **av)
|
||||
* transaction commit. We just want the super copy we pulled off the
|
||||
* disk to overwrite all the other copies
|
||||
*/
|
||||
printf("using SB copy %d, bytenr %llu\n", num,
|
||||
(unsigned long long)bytenr);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user