// IfsBackupInit.bcpl -- Backup system initialization (swappable)
// Copyright Xerox Corporation 1979, 1981

// Last modified October 4, 1981  4:13 PM by Taft

get "Ifs.decl"
get "IfsSystemInfo.decl"
get "IfsFiles.decl"
get "IfsBackup.decl"

external
[
// outgoing procedures
InitBackup

// incoming procedures
VFileWritePage; Zero; CreateEvent; BackupEvent

// incoming statics
infoVMD
]


//----------------------------------------------------------------------------
let InitBackup() be
//----------------------------------------------------------------------------
// Must be called after <System>Info file is opened
[
// Ensure backup info has correct format version;  if not, zero it out.
let bi = VFileWritePage(infoVMD, biPage)
if bi>>BI.version ne biVersion then Zero(bi, lenBI)

// Start up the backup system
CreateEvent(BackupEvent)
]