]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
os/bluestore/NVMEDevice: fix error handling for open()
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 25 Feb 2016 10:48:07 +0000 (10:48 +0000)
committerxiexingguo <xie.xingguo@zte.com.cn>
Fri, 26 Feb 2016 11:03:56 +0000 (19:03 +0800)
commite2bbce790f4798b8f34e071bc277ddb103675e0d
tree1d0a56d5740351042ac26654788d15d52ebc2baf
parent5f935455acb74c48e587921a0a16a51d3842c4a0
os/bluestore/NVMEDevice: fix error handling for open()

According to Linux man page, the system call read() may return zero to indicate
that end of file reached on success. So below here we need to convert the result
code to a customized one in this case as errno is not set and we actually want
let caller know something is going wrong.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/NVMEDevice.cc