Keep xform.c as a meta-file including the broken up bits, so that existing code that includes it continues to work
Individual algorithms can now be reused elsewhere, including outside of the kernel (malloc/free macros)
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 1844 Build 1851: arc lint + arc unit
Event Timeline
The removal of many 'static's in the change doesn't seem right to me (let me know if I'm wrong though). The reason behind them is that we do not want to export the symbols and instead the old code wrapped them in various struct enc_xform's as methods.
Also, the new xform.c have included some other .c files -- is this needed? (The usage is rare; needed sometimes but I think it's not really needed as long as the structs are exported, just like device methods).
Yes, I was doing it wrong. I had to remove the statics to use the functions. What I should have done (and do now) is access them via the exported struct enc_xform
Also, the new xform.c have included some other .c files -- is this needed? (The usage is rare; needed sometimes but I think it's not really needed as long as the structs are exported, just like device methods).
This file exists for compatibility. A number of other places in the tree use xform.c, the 'new' xform.c is just a bunch of #include statements of the various bits, basically glues it back together. I can remove that and update the other components if you think that makes more sense.
A quick note (harmless and no action required): the $FreeBSD$ changes -- you seem to keep the contents after colon (:) for the new files, and they can be changed to just $FreeBSD$ or left as-is. Changing these manually would create some surprises and make reviews harder.
Thanks very much for working on modularizing the stuff by the way.
That was actually SVN that did that, because I used 'svn copy', and because I totally rebased the xform_*.h files. Originally, the diff was smaller when they were based off of xform.c, but then you pointed out what I was doing wrong, and the diff was smaller (and the history would make sense) for them to be based on xform.h
Anyway, sorry about the confusion.