/*static char *SCCSID = "@(#)mfs_clos.c	6.2 92/01/31";*/
#define INCL_DOSERRORS
#include <os2.h>
#include <fsd.h>

#include "heap.h"
#include "api.h"
#include "filemode.h"
#include "const.h"
#include "misc.h"
#include "chain.h"
#include "buf.h"
#include "dir.h"
#include "storage.h"
#include "volume.h"
#include "tables.h"
#include "pb_ifs.h"
#include "pbmacros.h"
#include "superb.h"
#include "lw.h"
#include "frame.h"
#include "fsdata.h"
#include "tefti.h"
#include "pr_CACHE.h"
#include "pr_FCN.h"
#include "pr_HEAP.h"
#include "pr_MISC.h"
#include "pr_WRSUB.h"
#include "pr_DEBUG.h"
#include "pr_MFS.h"

/*
 ***	MFS_CLOSE - close a stage one file
 *
 *	This function is called to close a file during stage 1 of the boot
 *	sequence.  It cleans up various data structures and returns a value
 *	of 0.
 *
 *	Entry	No parameters
 *
 *	Returns error code (0 for success)
 *
 *	HISTORY
 *	    26-May-1989 by JR (John Rogers, JohnRo@Microsoft)
 *		- DCR 259.2: Changed names of macros in "frame.h".
 */

int far pascal
MFS_CLOSE ()
{
    USHORT erc;
    FRAME  frm;

    frm.usHardErr = NO_ERROR;
    frm.fRecheckAddr = TRUE;

#ifdef PRINTFS
    dprintf ("MFS_CLOSE ()\n");
#endif

    erc = Close (Stage1PFHT, (ULONG)OPEN_FOR_READ, &frm);

#ifdef DEBUG
    VBS ();
#endif
#ifdef PRINTFS
    dprintf ("MFS_CLOSE: Closed file, code=%d.\n", erc);
#endif
    return erc;
}
