identity.lisp 709 B

1234567891011121314151617181920212223
  1. (in-package :hurd)
  2. (defclass identity-spec (port-info)
  3. ((ino :initform nil
  4. :initarg :ino
  5. :accessor ino
  6. :documentation "Ino stat's field."))
  7. (:documentation "IO identification port."))
  8. (defmethod get-io-identity ((bucket port-bucket) ino)
  9. "Return an identity port for the node numbered 'ino'."
  10. (let ((found (bucket-find bucket
  11. (lambda (port)
  12. (and (typep port 'identity-spec)
  13. (eq (ino port) ino))))))
  14. (unless found
  15. (let ((new-port (make-instance 'identity-spec :ino ino)))
  16. (bucket-add-port bucket new-port)
  17. (setf found new-port)))
  18. (get-right found)))