Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2ca48a13 authored by James Bottomley's avatar James Bottomley Committed by James Bottomley
Browse files

[SCSI] fix proc_scsi_write to return "length" on success with remove-single-device case



Problem spotted by: Suzuki K P <suzuki@in.ibm.com>

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: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 665b44ae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment