When the nread return value < 0, if the total length ntotal that has been read is > 0, the function returns ntotal; otherwise, it returns the nread error code. Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>