xref: /csrg-svn/sys/stand.att/sys.c (revision 63370)
149117Sbostic /*-
2*63370Sbostic  * Copyright (c) 1982, 1988, 1993
3*63370Sbostic  *	The Regents of the University of California.  All rights reserved.
423243Smckusick  *
549117Sbostic  * %sccs.include.proprietary.c%
649117Sbostic  *
7*63370Sbostic  *	@(#)sys.c	8.1 (Berkeley) 06/11/93
823243Smckusick  */
9327Sbill 
1049117Sbostic #include <sys/param.h>
1149117Sbostic #include <sys/reboot.h>
1256509Sbostic 
1353697Ssklower #include <ufs/ufs/dir.h>
1460328Smckusick #include <stand.att/saio.h>
15327Sbill 
1649117Sbostic struct iob iob[SOPEN_MAX];
1749152Sbostic int errno;
1834463Sbostic 
1948826Swilliam #ifndef i386
exit()20327Sbill exit()
21327Sbill {
22327Sbill 	_stop("Exit called");
23327Sbill }
2448826Swilliam #endif
25327Sbill 
_stop(s)26327Sbill _stop(s)
2710022Ssam 	char *s;
28327Sbill {
2949152Sbostic 	static int stopped;
302391Stoy 	int i;
312391Stoy 
3241542Smckusick 	if (!stopped) {
3349152Sbostic 		stopped = 1;
3449117Sbostic 		for (i = 0; i < SOPEN_MAX; i++)
3541542Smckusick 			if (iob[i].i_flgs != 0)
3649152Sbostic 				(void)close(i);
3741542Smckusick 	}
38327Sbill 	printf("%s\n", s);
39327Sbill 	_rtt();
40327Sbill }
4160323Smckusick 
4260323Smckusick /*
4360323Smckusick  * For gcc
4460323Smckusick  */
__main()4560323Smckusick __main()
4660323Smckusick {
4760323Smckusick 	return;
4860323Smckusick }
49