Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add seekable check (eg: fifo) #515

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add seekable check (eg: fifo) #515

wants to merge 1 commit into from

Conversation

zxlxz
Copy link

@zxlxz zxlxz commented Jun 7, 2024

some file cannot use feek.
eg: fifo, network mount filesystem.

@ihilt ihilt self-requested a review June 17, 2024 12:20
@ihilt
Copy link
Contributor

ihilt commented Jun 24, 2024

Hello @zxlxz and thank you for this pull request!

My thought on this is that there are several function calls in eventlog.c which use fseeko or other functions which expect a seekable stream. If we review the way in which these functions are used in eventlog.c, it does not appear that this code would work as expected if those functions were bypassed. This leads me to the conclusion that the constructor function for lcm_eventlog_t (lcm_eventlog_create) should detect whether path is a seekable stream and if not, report that to the user, and then return NULL since the eventlog wouldn't work correctly.

Does that make sense to you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants