/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

#ident	"$Header: bdflush.c 1.3 89/02/16 $"

/*
 * usage: bdflush [autoup [bdflushrate]]
 *	autoup is the max age of delayed write buffers
 *		before they get written out.
 *	bdflushrate is the rate at which bdflush checks
 *		for delayed write buffers.
 * Should be run in the background since the syscall never returns
 */

main(argc, argv)
char *argv[];
{
	int autoup = 20;
	int bdflushrate = 10;

	switch (argc) {
	default:
		bdflushrate = atoi(argv[2]);
		/* fall through */
	case 2:
		autoup = atoi(argv[1]);
		break;
	case 1:
		break;
	}
	bdflush(autoup, bdflushrate);		/* no return */
	perror("bdflush");
	exit(1);
}
