diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-11-28 15:08:56 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-11-28 15:08:56 +0100 |
commit | 7c4885f0d79593cb0f3a7981444f611d7ced54b9 (patch) | |
tree | 0b94ac7b1405e162903f2252235b0669dc63e7a1 /gnu/build | |
parent | 08b1990a9368a5b33c13f6ec319b899c897822e7 (diff) |
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.
Diffstat (limited to 'gnu/build')
-rw-r--r-- | gnu/build/linux-modules.scm | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm index 0fa09b2912..a3bc7d6e33 100644 --- a/gnu/build/linux-modules.scm +++ b/gnu/build/linux-modules.scm @@ -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 |