kmodloader: cleanup duplicated mmap() code
authorTony Ambardar <itugrok@yahoo.com>
Tue, 19 Dec 2023 07:15:12 +0000 (23:15 -0800)
committerTony Ambardar <itugrok@yahoo.com>
Tue, 16 Jan 2024 01:54:35 +0000 (17:54 -0800)
commitc006dccecb6f1cf694c9fb9efc6727cbd2ab9ae4
treea76224db70c14e63e8306b1e6d421a63f8c956b7
parentba3908351232d4166cfc89c23c5c629e4092169d
kmodloader: cleanup duplicated mmap() code

Refactor code from get_module_info() and print_modinfo() to locate modinfo
data, call mmap() and handle errors, into new mmap_modinfo(). This drops
~30 source lines and shrinks the compressed binary ~100 bytes.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
kmodloader.c