MFS_SHARING_VIOLATION when opening in "a " mode after open in "r" mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MFS_SHARING_VIOLATION when opening in "a " mode after open in "r" mode

跳至解决方案
639 次查看
Fabi
Contributor III

When I open a file with "r" option, then closing it and opening it again with "a+" mode,

MQX runs in MFS_SHARING_VIOLATION in mfs_open.c:

            // If we are opening to write, the file can't already be opened.
            if ((access == MFS_ACCESS_WRITE_ONLY) || (access == MFS_ACCESS_READ_WRITE)) {
                error_code = MFS_SHARING_VIOLATION;
            }

What's wrong (with my calls)? Any ideas?

标记 (2)
0 项奖励
1 解答
407 次查看
Fabi
Contributor III

It was an application issue. In some circumstances, where was no "closing" between the two "openings".

在原帖中查看解决方案

0 项奖励
2 回复数
407 次查看
diego_augustus
Contributor II

Hi F.Bilz

Did you solve this problem?

Thanks.

0 项奖励
408 次查看
Fabi
Contributor III

It was an application issue. In some circumstances, where was no "closing" between the two "openings".

0 项奖励