From: James Bottomley Date: Thu, 27 Apr 2006 19:07:49 +0000 (-0500) Subject: [SCSI] fix proc_scsi_write to return "length" on success with remove-single-device... X-Git-Tag: v2.6.18-rc1~1092^2~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ca48a132167f9f12efba179382979aafde0ab36;p=pandora-kernel.git [SCSI] fix proc_scsi_write to return "length" on success with remove-single-device case Problem spotted by: Suzuki K P A zero return on success isn't correct for filesystem write functions. They should either return negative error or the length of bytes consumed. Add code to convert our zero on success error return to return the length of bytes passed in. This fixes the following: $ echo "scsi remove-single-device 0 0 3 0" > /proc/scsi/scsi bash: echo: write error: No such device or address" Signed-off-by: James Bottomley --- Reading git-diff-tree failed