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

fs2dt: Fix for parsing/reading entries > 4k #2

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

Conversation

benmcollins
Copy link

The device-tree only does 4k reads at a time, so for entries greater
than that, the fs2dt code would fail, assuming a single read would get
the whole item.

Added helper function to continue reading as long as there was data and
no errors.

This was evident from:

/proc/device-tree/soc@ffe000000/fman@400000/fman-firmware/fsl,firmware

On my P4080 system, which is 29668 bytes.

Signed-off-by: Ben Collins ben@cyphre.com

The device-tree only does 4k reads at a time, so for entries greater
than that, the fs2dt code would fail, assuming a single read would get
the whole item.

Added helper function to continue reading as long as there was data and
no errors.

This was evident from:

/proc/device-tree/soc@ffe000000/fman@400000/fman-firmware/fsl,firmware

On my P4080 system, which is 29668 bytes.

Signed-off-by: Ben Collins <ben@cyphre.com>
ryncsn added a commit to ryncsn/kexec-tools that referenced this pull request Mar 8, 2020
@barak
Copy link

barak commented Sep 14, 2023

Instead of defining its own auxiliary routine, I think this could now use slurp_file_len().

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.

2 participants