;;; -*- Mode:Lisp; Readtable:ZL; Package:USER; Base:8; Patch-File:T -*-
;;; Patch file for System version 121.31
;;; Reason:
;;;  Avoid bombout attempting to determine owner of shared device if sys-conf not available.
;;; Written 12-Feb-87 10:11:05 by rg (Richard Greenblatt) at site LMI Cambridge
;;; while running on Guinea Pig from band 2
;;; with Experimental System 121.22, Experimental Lambda-Diag 15.0, Experimental ZMail 70.2, Experimental KERMIT 32.0, Experimental Unix-Interface 10.0, Experimental Local-File 72.0, Experimental FILE-Server 21.0, Experimental Tape 13.0, microcode 1730, SDU Boot Tape 3.12, SDU ROM 102.



; From file DJ: L.SYS; SHARED-DEVICE.LISP#49 at 12-Feb-87 10:11:09
#8R SYSTEM-INTERNALS#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "SYSTEM-INTERNALS")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: SYS; SHARED-DEVICE  "

(defmethod (basic-shared-device :owner) ()
  "Returns either :NOT-ON-BUS, NIL if no one owns it, or a slot number (between 0..31.)."
  (if (sys-conf-structure-available-p)
      (let ((owner (send self :sys-conf-owner)))
	(cond ((eq owner -1)
	       :not-on-bus)
	      ((ldb-test (byte 1 31.) owner)
	       (get-slot-index owner))
	      (t nil)))
    :not-on-bus))

))
