/*static char *SCCSID = "@(#)findpvol.c	6.1 90/11/18";*/
/*static char *SCCSID = "@(#)findpvol.c	13.3 90/01/25";*/
#ifndef  _BTXT
#define  _BTXT _BTXT
#define  _THISFILE "FINDPVOL.C"
#include _THISFILE.C
#undef   _BTXT
#endif

#ifndef HDRS
#define HDRS

#include <os2def.h>
#include "const.h"
#include "misc.h"
#include "chain.h"
#include "buf.h"
#include "dir.h"
#include "volume.h"
#include "storage.h"
#include "tables.h"
#include "frame.h"
#include "lw.h"
#include "fsdata.h"

#endif

#include "pr_misc.h"


/*
 ***	FindPVol - Find Pointer to Volume table entry.
 *
 */

PVOLTAB
FindPVol (HVOL hVPB)
{
	register UINT i;

	/* search the entire (normal mount) table for a matching hVPB */
        for (i = 0; i < VOLMNTMAX; i++) {
            if (aVolHVPB [i] == hVPB) {
                if (!afVolDirty[i])
                    return (VolPtr [i]);
                else
                    return (NULL);
            }
        }
	return (NULL);
}
