/*static char *SCCSID = "@(#)findavol.c	6.1 90/11/18";*/
/*static char *SCCSID = "@(#)findavol.c	13.3 90/01/25";*/
#define ASWAP1 ASWAP1
#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"
#include "pr_misc.h"


/*
 ***	FindAnyVol - Find Pointer to Volume table entry (normal or
 *	force-mounted).
 *
 *	HISTORY
 *	    19-Sep-89 by JR (John Rogers, JohnRo@Microsoft)
 *		- Avoid warnings from Microsoft C 5.2 (on slash-slash comments).
 *	    16-Jun-1989 by JR (John Rogers, JohnRo@Microsoft)
 *		- PTR B784106: Created FindAnyVol from scratch.
 */

PVOLTAB
FindAnyVol (HVOL hVPB)
{
	register UINT i;

	/*
	 * Search the entire mount table for a matching hVPB, whether it was
	 * mounted normally or force-mounted.
	 */
        for (i = 0; i < VOLMNTMAX; i++) {
		if (aVolHVPB [i] == hVPB) {
			return (VolPtr [i]);
		}
	}
	return (NULL);
}
