Attention is currently required from: Nico Huber, David Hendricks, Angel Pons, Arthur Heymans. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/61943 )
Change subject: libflashrom/fmap: Don't use off_t for flash offsets ......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Well, I think we both agree that the difference is miniscule, I just like to err on fixed width as t […]
...okay, I tried to look into adding a global typedef for this (of any kind) but it quickly gets complicated. There's offsets and flash sizes and flash sizes but in kilobytes and block sizes and sizes of structures on the flash and all sorts of stuff, and it's not super clear to me what things should have the same type. Furthermore, using a signed type for a flash offset really doesn't seem to make a lot of sense the more I consider it. It really just needs to be that way because fmap_lsearch() wants to use the same type to return errors with negative values, which probably means that the function should be fixed rather than defining the type wrong for the whole rest of the repo. But I haven't really worked in flashrom before and don't have the experience with the code to make all those decisions.
Would you mind if we just merge this patch as is to get rid of the off_t problem for now? You guys can keep discussing how to clean this up long term and decide to make it all long or unsigned long or whatever if you want. I'm really just here to make sure nobody else needs to spend hours to figure out why their compilers all collectively decided to produce code that doesn't fit together.