IagoOps.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Iago: internal interface
Andrew Birrell December 7, 1983 10:42 am
Willie-Sue, March 8, 1984 5:37:01 pm PST
Russ Atkinson, June 14, 1984 3:01:55 pm PDT
DIRECTORY
Booting USING[ Switches ],
Disk USING[ Channel, PageCount, PageNumber ],
File USING[ RC, Volume, VolumeFile, VolumeID ],
IO USING[ STREAM ],
PhysicalVolume USING[ Physical ],
Rope USING[ ROPE ];
IagoOps: CEDAR DEFINITIONS = BEGIN
ROPE: TYPE = Rope.ROPE;
STREAM: TYPE = IO.STREAM;
--File.--VolumeID:
TYPE =
MACHINE
DEPENDENT
RECORD[
a,b,c: CARDINAL,
t: LONG CARDINAL
];
Rubout: ERROR;
GetID:
PROC
[in, out: STREAM, default: ROPE, init: ROPE ← NIL, echo: BOOL ← TRUE]
RETURNS [id: ROPE, c: CHAR];
CommandList: TYPE = LIST OF CommandInfo;
CommandProc: TYPE = PROC [in,out: STREAM];
CommandInfo:
TYPE =
RECORD [
commandProc: CommandProc, fullName: ROPE ← NIL, okWhenNoDisk: BOOL ← FALSE];
RegisterCommand:
PROC [info: CommandInfo];
Registers a new command with Iago. This registry is NOT protected against concurrent access.
GetCommandList: PROC RETURNS [CommandList];
GetCommand: PROC[in, out: STREAM, diskReadable: BOOL] RETURNS [found: CommandInfo];
GetArg: PROC[in, out: STREAM, prompt, default: ROPE, help: PROC] RETURNS [value: ROPE ← NIL];
Confirm: PROC[in, out: STREAM] RETURNS[BOOL];
ConfirmDestruction: PROC[in, out: STREAM, which: ROPE] RETURNS[BOOL];
GetNumber:
PROC
[in, out: STREAM, default: INT, max: INT ← LAST[INT], prompt, help: ROPE]
RETURNS[size: INT ← 0];
GetSize: PROC[in, out: STREAM, default: INT, max: INT ← LAST[INT]] RETURNS[size: INT ← 0];
GetFile:
PROC[
in, out: STREAM,
prompt: ROPE ← NIL,
extension: ROPE ← NIL,
default: ROPE ← NIL,
wDir: ROPE ← NIL,
check: BOOL ← FALSE,
pattern: BOOL ← FALSE]
RETURNS[name: ROPE];
GetSwitches: PROC[in, out: STREAM] RETURNS[switches: Booting.Switches];
clientVolName: ROPE;
GetLogical: PROC[in, out: STREAM, direction: ROPE ← NIL] RETURNS[v: File.Volume];
GetPhysical: PROC[in, out: STREAM] RETURNS[p: PhysicalVolume.Physical];
GetDrive: PROC[in, out: STREAM] RETURNS[d: Disk.Channel];
FileError: PROC[why: File.RC] RETURNS[ROPE];
ReservePages: PROC[in, out: STREAM, p: PhysicalVolume.Physical];
CheckAltoRegions: PROC[in, out: STREAM] RETURNS[BOOL];
ReserveAltoRegions: PROC[in, out: STREAM];
NextRun: PROC[d: Disk.Channel, origin: Disk.PageNumber] RETURNS[firstPage: Disk.PageNumber, pageCount: Disk.PageCount-- -1 at end of disk --];
NewID: PROC RETURNS[new: File.VolumeID];
PutID: PROC[out: STREAM, id: File.VolumeID];
InitialMicrocodeFileName: PROC RETURNS[ROPE];
RemoteRootFileName: PROC[which: File.VolumeFile[checkpoint..bootFile]] RETURNS[ROPE];
LocalRootFileName: PROC[which: File.VolumeFile] RETURNS[ROPE];
WriteRemoteNames:
PROC
[volume: ROPE, systemHost,userHost: ROPE, out: STREAM] RETURNS [success: BOOL];
Writes the remote names to the named volume as []<volume>RemoteNames.DontDeleteMe. Errors or success are reported through the out stream (if any). volume = NIL => use system volume.
ReadRemoteNames:
PROC [volume:
ROPE]
RETURNS [success:
BOOL];
Reads the remote names (and affects DefaultRemoteNames.Get[]) from []<volume>RemoteNames.DontDeleteMe. Errors are ignored, but cause success = FALSE. volume = NIL => use system volume.
ext: PUBLIC ARRAY File.VolumeFile[checkpoint..bootFile] OF ROPE;
END.