mbox series

[0/2] further copyfile cleanups

Message ID 20240628024201.1812065-1-dominique.martinet@atmark-techno.com
Headers show
Series further copyfile cleanups | expand

Message

Dominique Martinet June 28, 2024, 2:41 a.m. UTC
These two patches are also part of the serie I had sent as RFC
previously, but are more intrusive / have less immediate value so I
didn't send them in the first batch of cleanups.

The first moves out the hash comparison code in a subfunction, that my
later code will also use; on its own there is not much point to it but
it doesn't hurt either.

The second patch was more of an itch I had, seeing 13 unnamed arguments
to a function makes it very hard to update all callers properly without
making a mistake so I used a struct to allow for easier updates: adding
more optional (0=off) fields is transparent and this will make further
additions much easier to do (and allow my off-tree patches to not cause
build failures every few months when a new handler is added or modified)

Thanks!


Dominique Martinet (2):
  cpio_utils: move out hash comparison in a helper
  copyfile refactor: replace the 13 arguments by a struct

 core/cpio_utils.c           | 204 ++++++++++++++++--------------------
 core/installer.c            |  19 ++--
 core/stream_interface.c     |  24 ++++-
 handlers/copy_handler.c     |  20 ++--
 handlers/delta_handler.c    |  29 +++--
 handlers/readback_handler.c |  20 ++--
 include/util.h              |  40 +++++--
 7 files changed, 188 insertions(+), 168 deletions(-)