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

store errno in SIMPLE-FILE-ERROR conditions #442

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions level-1/l1-error-signal.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
(format-string (if errargs
(format nil "~a : ~a" error-string "~s")
error-string)))
(%err-disp-common nil err-type format-string errargs frame-ptr)))
(%err-disp-common errno err-type format-string errargs frame-ptr)))


(defun %err-disp-internal (err-num errargs frame-ptr)
Expand Down Expand Up @@ -87,7 +87,8 @@
(simple-file-error (make-condition condition-name
:pathname (car errargs)
:error-type format-string
:format-arguments (cdr errargs)))
:format-arguments (cdr errargs)
:errno err-num))
(undefined-function (make-condition condition-name
:name (car errargs)))
(call-special-operator-or-macro
Expand Down
6 changes: 5 additions & 1 deletion level-1/l1-error-system.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,11 @@
(file-error-pathname c)))))

(define-condition simple-file-error (simple-condition file-error)
()
((errno
:type (or integer null)
:initarg :errno
:initform nil
:reader simple-file-error-errno))
(:report (lambda (c s)
(apply #'format s (slot-value c 'error-type)
(file-error-pathname c)
Expand Down