]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: Propagate correct errno values
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 21 Aug 2024 20:42:32 +0000 (22:42 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 22 Aug 2024 21:53:20 +0000 (16:53 -0500)
commitdf8354e97b9bdeb06a9a2dab48391f080cf35ca3
tree057f9963554cf71e1553419f2c3c4fe02d1f7573
parentfbe86ce8a65007ecdcb76e7f47dc6585f35f788b
libkmod: Propagate correct errno values

Make sure that errors never end up with errno being 0. These code paths
negate the errno value to get a negative value to propagate the fact
that an error occurred. -0 would be 0 again so errors are not detected.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/83
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-builtin.c