/*
 * This program calculates the number of blocks free on whatever
 * active filesystem gets passed to it. It appears that
 * if the file system is very full, it prevents the return of output
 * files from HASP by telling the rje system that there
 * isnt enough space left. See /usr/hasp/.makefile for its installation.
 */
fsfree(d, v)
int v[];
{
	struct {
		long	fb;
		short	fi;
		short	i1;
		short 	i2;
		char	name[12];
	} fsb;
	register int t;
	t = ustat(d, &fsb);
	if(fsb.fb < 0L || fsb.fb > 32767L)
		*v++ = 32767;
	else	*v++ = (int)(fsb.fb);
	if(fsb.fi < 0)
		*v = 32767;
	else	*v = fsb.fi;
	return (t);
};
