file-getcontrol.lisp 694 B

123456789101112131415161718
  1. (in-package :hurd-translator)
  2. ;; Return control port for this filesystem.
  3. (def-fs-interface :file-getcontrol ((file port)
  4. (control port-pointer)
  5. (control-type :pointer))
  6. (with-lookup protid file
  7. (block file-getcontrol
  8. (unless (is-controller-p (get-node protid)
  9. (get-user protid))
  10. (return-from file-getcontrol :not-permitted))
  11. (let ((port (bucket-add-control-port (port-bucket *translator*))))
  12. (setf (mem-ref control 'port) (get-right port))
  13. (setf (mem-ref control-type 'msg-type-name) :make-send)
  14. t))))