apps/examples/userfs: Fix check for open with write+append mode.

This commit is contained in:
Gregory Nutt 2017-11-01 16:58:43 -06:00
parent b0bcca49ed
commit 20119c3647

View File

@ -232,7 +232,7 @@ static int ufstest_open(FAR void *volinfo, FAR const char *relpath,
return -ENOMEM;
}
if ((oflags && O_APPEND) != 0)
if ((oflags & (O_WROK | O_APPEND)) == (O_WROK | O_APPEND))
{
opriv->pos = file->inuse;
}