Re: [PATCH v2 3/3] btrfs-progs: handle error in the btrfs_prepare_device

2013-12-17 Thread David Sterba
On Tue, Dec 17, 2013 at 04:37:35PM +0800, Anand Jain wrote: > >>+zero_dev_error: > >>+ if (ret) { > >>+ ret < 0 ? > >>+ fprintf(stderr, "ERROR: failed to zero device start '%s' - > >>%s\n", > >>+ file, strerror(-ret)) : > >>+ fprintf(stderr, "ERROR

Re: [PATCH v2 3/3] btrfs-progs: handle error in the btrfs_prepare_device

2013-12-17 Thread Anand Jain
+ ret = btrfs_prepare_device(fddstdev, dstdev, 1, &dstdev_block_count, 0, +&mixed, 0); close(fddstdev); + if (ret) + goto leave_with_error; fddstdev = -1; yeah moved this 3 lines up. thanks. You change the code

Re: [PATCH v2 3/3] btrfs-progs: handle error in the btrfs_prepare_device

2013-12-17 Thread Stefan Behrens
On Tue, 17 Dec 2013 10:33:36 +0800, Anand Jain wrote: > this patch will handle the strerror reporting of the error instead of > printing errno, and also replaced the BUG_ON with the error handling > > Signed-off-by: Anand Jain > --- > v2: commit update > --- > cmds-device.c | 7 +++ > cm

[PATCH v2 3/3] btrfs-progs: handle error in the btrfs_prepare_device

2013-12-16 Thread Anand Jain
this patch will handle the strerror reporting of the error instead of printing errno, and also replaced the BUG_ON with the error handling Signed-off-by: Anand Jain --- v2: commit update --- cmds-device.c | 7 +++ cmds-replace.c | 10 -- mkfs.c | 9 - utils.c