Re: [PATCH 3/4] btrfs-progs: Add more meaningful return value for btrfs_read_dev_super() and corresponding error string.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 03, 2014 at 05:36:37PM +0800, Qu Wenruo wrote:
> --- a/btrfs-find-root.c
> +++ b/btrfs-find-root.c
> @@ -96,7 +96,10 @@ static struct btrfs_root *open_ctree_broken(int fd, const char *device)
>  	ret = btrfs_read_dev_super(fs_devices->latest_bdev,
>  				   disk_super, fs_info->super_bytenr, 1);
>  	if (ret) {
> -		printk("No valid btrfs found\n");
> +		if (ret == -ENOENT)
> +			printk("No valid btrfs found\n");

Please use fprintf(stderr, ...) for error messages, until we have a
better message logging helpers.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux