Skip to content
Snippets Groups Projects
Commit bff035d1 authored by dx's avatar dx
Browse files

st3m_tar: only update sys files if changed

Becuase the tar extractor is streaming, this accomplishes that by:

1. doing a big malloc() of the size of the file (which, given the files
   we have, and how early we are in the boot process, is perfectly
   reasonable)
2. putting the file contents in there
3. opening the file on disk and comparing to see if updating is needed
4. writing only in that case

In hindsight the part of reading the file from disk could also be a big
malloc but I went for 4kbyte buffers.

The performance difference between writing and doing anything else is so
big that I didn't really need to care about making this code fast.
parent 56a53590
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment