/* @(#)ffileread.c	1.7 00/12/03 Copyright 1986 J. Schilling */
/*
 *	Copyright (c) 1986 J. Schilling
 */
/*@@C@@*/

#include "io.h"
#include <errno.h>

EXPORT int
ffileread(f, buf, len)
	register FILE	*f;
	void	*buf;
	int	len;
{
	register int	fd;
	register int	ret;

	down2(f, _IOREAD, _IORW);
	fd = fileno(f);

	while((ret = read(fd, buf, len)) < 0 && geterrno() == EINTR)
		;
	return(ret);
}
