Re: [PATCH 2/2] btrfs-progs: device delete to accept devid

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

 




Hi Goffredo,

 sorry to have missed this.


On 08/20/2015 07:29 PM, Goffredo Baroncelli wrote:
Hi Anand
On 2015-08-14 12:36, Anand Jain wrote:
This patch introduces new option <devid> for the command

[...]

+
+		if (is_numerical(argv[i])) {
+			argv3.devid = arg_strtou64(argv[i]);
+			its_num = true;
+		} else if (is_block_device(argv[i])) {


please be aware that is_block_device(), returns
- 1 if the file is a block device,
- < 0 in case of an error (eg: file not found)
- 0 otherwise

so I suggest to change the check in

  +		} else if (is_block_device(argv[i]) == 1) {

[...]


oh yes. I didn't notice that.

In fact everywhere we didn't check the return properly.
I wrote a new patch to fix this.

Thanks, Anand

--
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