.title MOUNTONE Mount a single disk .ident /V1.02/ .sbttl Documentation ; ; This is a simple mainline that passes a disk name to the ; MOUNTDEV subroutine. It main purpose is for testing ; the main MOUNTDEV subroutine to find out what is screwed ; up with it. ; ; Eric F. Richards ; Gould OSD VAXcluster VAX/VMS V4.3 ; 02-May-86 ; .sbttl Constants, macros, etc .enable suppression ; clean up the listing file .disable traceback, debug ; hands off/w debugger .default displacement, byte ; this is a short program! .macro clrsp space, fill=#0 ; macro for clearing space subl space, sp ; on stack for a data area. movc5 #0, (sp), fill, - ; data area is init'd to space, (sp) ; nulls by this macro .endm clrsp ; that's it! $ssdef ; define system service errors $prvdef ; define privilege mask codes bufsiz = 32 ; disk name buffer size privs = prv$m_phy_io!prv$m_cmexec!prv$m_cmkrnl!prv$m_sysnam .sbttl Main Code .psect $code, long, exe, pic, shr, nowrt .entry mountone, ^m clrsp #bufsiz ; make a character buffer pushl sp ; ...for a device name pushl #bufsiz ; and build a descriptor for it movl sp, r5 ; save a pointer to the descr pushaq #^a/Device: / ; make a prompt for the dev name pushl #8 ; make a descr for said prompt movl sp, r4 ; got a pointer to the prompt pushl r5 ; truncate descr w/ returned len pushl r4 ; prompt with this string pushl r5 ; write response here calls #3, g^lib$get_foreign ; get the device name blbc r0, 20$ ; on error get out tstw (r5) ; did we get a response? beql 10$ ; if not, error out calls #0, 30$ ; get normal privs cmpw #ss$_normal, r0 ; success? beql 5$ ; if so, skip error handler $cmexec_s routin=30$ ; try this blbc r0, 20$ ; on error, bomb out 5$: pushl r5 ; set up to call mountdev calls #1, mountdev ; mount the device ret ; return to caller 10$: movzwl #ss$_badparam, r0 ; null string gets this 20$: ret ; get out .align long 30$: .word 0 ; set temp priv for phy_io, etc $setprv_s enbflg=#1, - ; turn on temporary privs prvadr=#privs ; with this mask! ret ; go back to caller .end mountone ; end of the routine