commit | 07a9e548af0ed26d7354f3defaa8f18b2c5125f1 | [log] [tgz] |
---|---|---|
author | tao.pei <tao.pei@ck-telecom.com> | Fri Jul 17 17:18:41 2015 +0800 |
committer | Narayan Kamath <narayan@google.com> | Tue Jul 21 10:51:48 2015 +0100 |
tree | bac808f24cd14d4bc55c885132a2966c487e6ac9 | |
parent | 4889c07b795dac023a90df36f1cc7cffce8dbe0d [diff] |
Use errno correctly. After a failed write() or ioctl(), errno wasn't being checked until after some other function calls that could also modify errno, thus checking the wrong errno. Make sure to check it prior to doing anything else that can modify it. [Preconditions] 1.PC connects with phone(mtp). [Procedures] 1.Copy a file from PC to phone. 2.Cancel the copying. 3.Recopy the file. Change-Id: Id772fca7ccb96d3f43bd4beb210bedd8d3ac17fa