mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-02 12:49:03 +00:00
After aligning NuttX open() flag constants with Linux (O_RDONLY=0,
O_WRONLY=1, O_RDWR=2), code that used '(flags & O_RDONLY)' or
'(flags & O_WRONLY)' as a bitmask check is broken because O_RDONLY
is now 0. Fix by using '(flags & O_ACCMODE)' comparisons instead.
- usrsocktest: replace 'flags & O_RDWR' with 'flags & O_ACCMODE'
in fcntl F_GETFL assertions
- dd: verify mode used '(oflags & O_RDONLY)' to detect verify;
replace with '(oflags & O_ACCMODE) == O_RDWR'
- dpopen: replace '(oflag & O_RDWR) == O_RDWR' with
'(oflag & O_ACCMODE) == O_RDWR'
- usbmsc: replace 'flags & O_WRONLY' with
'(flags & O_ACCMODE) == O_RDONLY'
- fcntl_test: replace '(flags & O_WRONLY) == 0' with
'(flags & O_ACCMODE) == O_RDONLY'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
|
||
|---|---|---|
| .. | ||
| arch | ||
| cmocka | ||
| cxx | ||
| cxx-oot-build | ||
| drivers | ||
| enet | ||
| fff | ||
| fs | ||
| libc | ||
| ltp | ||
| mm | ||
| nettest | ||
| nuts | ||
| ostest | ||
| sched | ||
| sig_sp_test | ||
| testsuites | ||
| unity | ||
| .gitignore | ||
| CMakeLists.txt | ||
| Make.defs | ||
| Makefile | ||