149117Sbostic /*- 249117Sbostic * Copyright (c) 1982, 1988 The Regents of the University of California. 349117Sbostic * All rights reserved. 423243Smckusick * 549117Sbostic * %sccs.include.proprietary.c% 649117Sbostic * 7*60323Smckusick * @(#)sys.c 7.19 (Berkeley) 05/24/93 823243Smckusick */ 9327Sbill 1049117Sbostic #include <sys/param.h> 1149117Sbostic #include <sys/reboot.h> 1256509Sbostic 1353697Ssklower #include <ufs/ufs/dir.h> 1456509Sbostic #include <stand/saio.h> 15327Sbill 1649117Sbostic struct iob iob[SOPEN_MAX]; 1749152Sbostic int errno; 1834463Sbostic 1948826Swilliam #ifndef i386 20327Sbill exit() 21327Sbill { 22327Sbill _stop("Exit called"); 23327Sbill } 2448826Swilliam #endif 25327Sbill 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 } 41*60323Smckusick 42*60323Smckusick /* 43*60323Smckusick * For gcc 44*60323Smckusick */ 45*60323Smckusick __main() 46*60323Smckusick { 47*60323Smckusick return; 48*60323Smckusick } 49