Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insmod: Fix exit code regression #178

Closed
wants to merge 2 commits into from

Conversation

stoeckmann
Copy link
Contributor

The tools have two different ways of deciding how the final exit code should look like:

  1. Variable r is set and checked
  2. Variable err is set and checked

The commit ca8f04e adjusted insmod, expecting that option 1 is in place. But insmod belongs to the group which uses option 2.

Since this commit never hit any release, this regression never affected anyone out there (I guess).

Proof of Concept:

kmod 33:

$ insmod -
insmod: ERROR: this tool does not support loading from stdin!
$ echo $?
1

kmod master:

$ insmod -
insmod: ERROR: this tool does not support loading from stdin!
$ echo $?
0

Signed-off-by: Tobias Stoeckmann <[email protected]>
The variable r is not read when evaluating final exit code. Use
err instead.

Signed-off-by: Tobias Stoeckmann <[email protected]>
@evelikov
Copy link
Collaborator

There is an alternative fix following Lucas' suggestion in #172

Let me go around and pull the prep work to separate PR(s)...

@stoeckmann stoeckmann closed this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants