kmod-project / kmod

kmod - Linux kernel module handling
GNU Lesser General Public License v2.1
50 stars 39 forks source link

Index bugfix and papercuts #224

Closed evelikov closed 3 weeks ago

evelikov commented 3 weeks ago

While looking at how to make the index API properly handle error conditions, I noticed that we completely broke the API.

The first commit fixes that + reintroduces earlier proposal of mine. The initial counter argument had a good point but was a bit absolute (aka thinking of a extreme case, that isn't applicable to us).

The rest are bunch of paper cuts, that I've accumulated as part of the initial goal.

/cc @stoeckmann can you check the first commit? can I offer some :cookie: for adding an in-tree test?

Random notes:

evelikov commented 3 weeks ago

Some brown paperbag fixes :facepalm:

lucasdemarchi commented 3 weeks ago

@stoeckmann are you ok with this version?

stoeckmann commented 3 weeks ago

@stoeckmann are you ok with this version?

Won't stop merge process. I'd prefer _cleanup_free_ but it's not like this is the only function which does it manually.

lucasdemarchi commented 3 weeks ago

@stoeckmann agreed. I created #233 so we don't forget. Let's see what is the clang-analyzer situation with that. Applied, thanks.

evelikov commented 2 weeks ago

We need tests for kmod_dump_index with all the different indexen.