diff options
Diffstat (limited to 'sys-apps/kmod/files/kmod-26/fix-from-upstream-convert-return-value.patch')
| -rw-r--r-- | sys-apps/kmod/files/kmod-26/fix-from-upstream-convert-return-value.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/sys-apps/kmod/files/kmod-26/fix-from-upstream-convert-return-value.patch b/sys-apps/kmod/files/kmod-26/fix-from-upstream-convert-return-value.patch deleted file mode 100644 index 29e23e1e96b1..000000000000 --- a/sys-apps/kmod/files/kmod-26/fix-from-upstream-convert-return-value.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 81dbf2bee644ef035d054e2101fceea86c50e07d Mon Sep 17 00:00:00 2001 -From: Topi Miettinen <toiwoton@gmail.com> -Date: Mon, 23 Dec 2019 18:58:13 +0200 -Subject: libkmod-module: convert return value from system() to errno - -Don't use exit status of a command directly as errno code, callers -will be confused. - -Signed-off-by: Topi Miettinen <toiwoton@gmail.com> ---- - libkmod/libkmod-module.c | 17 +++++++++++------ - 1 file changed, 11 insertions(+), 6 deletions(-) - -diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c -index 8044a8f..714ee21 100644 ---- a/libkmod/libkmod-module.c -+++ b/libkmod/libkmod-module.c -@@ -980,14 +980,19 @@ static int command_do(struct kmod_module *mod, const char *type, - err = system(cmd); - unsetenv("MODPROBE_MODULE"); - -- if (err == -1 || WEXITSTATUS(err)) { -- ERR(mod->ctx, "Error running %s command for %s\n", -- type, modname); -- if (err != -1) -- err = -WEXITSTATUS(err); -+ if (err == -1) { -+ ERR(mod->ctx, "Could not run %s command '%s' for module %s: %m\n", -+ type, cmd, modname); -+ return -EINVAL; - } - -- return err; -+ if (WEXITSTATUS(err)) { -+ ERR(mod->ctx, "Error running %s command '%s' for module %s: retcode %d\n", -+ type, cmd, modname, WEXITSTATUS(err)); -+ return -EINVAL; -+ } -+ -+ return 0; - } - - struct probe_insert_cb { --- -cgit 1.2-0.3.lf.el7 - |
