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

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

 






+	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 to call close(fddstdev) twice.

[...]
+zero_dev_error:
+	if (ret) {
+		ret < 0 ?
+		fprintf(stderr, "ERROR: failed to zero device start '%s' - %s\n",
+			file, strerror(-ret)) :
+		fprintf(stderr, "ERROR: failed to zero device start '%s' - %d\n",
+			file, ret);

This is not funny.

 hmm. I am not sure what you mean ?

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