mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
linux-modules: Correctly propagate error code from 'init_module'.
* gnu/packages/patches/guile-linux-syscalls.patch (scm_load_linux_module): Leave 'errno' unchanged when ERR != 0. * gnu/build/linux-modules.scm (load-linux-module*): Check for the errno value of ARGS to determine whether the module was already loaded.
This commit is contained in:
@@ -160,11 +160,7 @@ module name."
|
||||
(lambda args
|
||||
;; If this module was already loaded and we're in modprobe style, ignore
|
||||
;; the error.
|
||||
|
||||
;; FIXME: Use errno once 'guile-linux-syscalls.patch' provides a useful
|
||||
;; errno here.
|
||||
(unless (and recursive?
|
||||
(module-loaded? (string-drop-right (basename file) 3)))
|
||||
(unless (and recursive? (= EEXIST (system-error-errno args)))
|
||||
(apply throw args)))))
|
||||
|
||||
;;; linux-modules.scm ends here
|
||||
|
||||
Reference in New Issue
Block a user