Bug Report: In MQX 4.1 _io_mfs_read & _io_mfs_write do not advance the file location

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Bug Report: In MQX 4.1 _io_mfs_read & _io_mfs_write do not advance the file location

1,200件の閲覧回数
chrissolomon
Contributor III

Hi,

I believe I have found a bug in MFS (shipped with MQX 4.1.0.1).

In MFS shipped with MQX 4.0.1 the call to MFS_Read and MFS_Write is made with the file pointer, and the location is advanced as it should be.

In MFS shipped with MQX 4.1.0.1 the call to MFS_Read and MFS_Write is made using the MFS_HANDLE pointer, which contains a different location (which is updated), but the location in the file pointer is not.

This breaks the ftell functionality.

Proposed fix:

Add the following line of code:

file_ptr->LOCATION = handle->LOCATION;

at line 710 and 811 of mfs_init.c

This seems to fix the problem for me.

Thanks

Chris

ラベル(1)
タグ(3)
5 返答(返信)

776件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Chris, thank you for sharing your solution in the community, I will reproduce it and submit a report if necessary.

Any time you think you find a bug I recommend to submit a Service Request at our web page www.freescale.com/support ,  technical support team can evaluate the case and report it to development team.


Have a great day,
Daniel

0 件の賞賛
返信

776件の閲覧回数
chrissolomon
Contributor III

OK, but I'll also post it here, if I have a solution, so others having the same problem can take advantage of the patch until the issue is resolved in a subsequent release.

0 件の賞賛
返信

776件の閲覧回数
LuisCasado
NXP Employee
NXP Employee

Hello,

Check MQX 4.1.1, I think the fix is already included.

Luis

0 件の賞賛
返信

776件の閲覧回数
LuisCasado
NXP Employee
NXP Employee

Hi,

Yes, it is.

Luis

0 件の賞賛
返信

776件の閲覧回数
chrissolomon
Contributor III

OK, good to know - I am in the process of stabilizing our product code on 4.1.0.1, I plan to do the 4.1.1 update once I have the all the product features verified and have merged back to the main development branch.

0 件の賞賛
返信