Fix incorrect access mode check
The O_* variales are integers and aren't not suitable with bit
operation, because O_RDONLY is 0, so if the mode is O_RDONLY, (mode &
O_RDONLY) always return false. So the access mode is always 0,
that means F_OK rather than R_OK.
Change-Id: If750f85864d32f7d0a039b2ee114ef133a311434
Signed-off-by:
Chengwei Yang <chengwei.yang@intel.com>
Loading
Please sign in to comment