kern_shutdown.c (38490) | kern_shutdown.c (38874) |
---|---|
1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 | 1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 |
39 * $Id: kern_shutdown.c,v 1.36 1998/08/19 20:20:52 des Exp $ | 39 * $Id: kern_shutdown.c,v 1.37 1998/08/23 14:18:08 des Exp $ |
40 */ 41 42#include "opt_ddb.h" 43#include "opt_hw_wdog.h" 44#include "opt_panic.h" 45#include "opt_show_busybufs.h" 46 47#include <sys/param.h> --- 346 unchanged lines hidden (view full) --- 394 * and then reboots. If we are called twice, then we avoid trying to sync 395 * the disks as this often leads to recursive panics. 396 */ 397void 398panic(const char *fmt, ...) 399{ 400 int bootopt; 401 va_list ap; | 40 */ 41 42#include "opt_ddb.h" 43#include "opt_hw_wdog.h" 44#include "opt_panic.h" 45#include "opt_show_busybufs.h" 46 47#include <sys/param.h> --- 346 unchanged lines hidden (view full) --- 394 * and then reboots. If we are called twice, then we avoid trying to sync 395 * the disks as this often leads to recursive panics. 396 */ 397void 398panic(const char *fmt, ...) 399{ 400 int bootopt; 401 va_list ap; |
402 static char buf[256]; |
|
402 403 bootopt = RB_AUTOBOOT | RB_DUMP; 404 if (panicstr) 405 bootopt |= RB_NOSYNC; 406 else 407 panicstr = fmt; 408 | 403 404 bootopt = RB_AUTOBOOT | RB_DUMP; 405 if (panicstr) 406 bootopt |= RB_NOSYNC; 407 else 408 panicstr = fmt; 409 |
409 printf("panic: "); | |
410 va_start(ap, fmt); | 410 va_start(ap, fmt); |
411 vprintf(fmt, ap); | 411 (void)vsprintf(buf, fmt, ap); 412 if (panicstr == fmt) 413 panicstr = buf; |
412 va_end(ap); | 414 va_end(ap); |
413 printf("\n"); | 415 printf("panic: %s\n", buf); |
414#ifdef SMP 415 /* three seperate prints in case of an unmapped page and trap */ 416 printf("mp_lock = %08x; ", mp_lock); 417 printf("cpuid = %d; ", cpuid); 418 printf("lapic.id = %08x\n", lapic.id); 419#endif 420 421#if defined(DDB) --- 72 unchanged lines hidden (view full) --- 494 count++; 495 } else { 496 epp = &ep->next; 497 } 498 ep = *epp; 499 } 500 return (count); 501} | 416#ifdef SMP 417 /* three seperate prints in case of an unmapped page and trap */ 418 printf("mp_lock = %08x; ", mp_lock); 419 printf("cpuid = %d; ", cpuid); 420 printf("lapic.id = %08x\n", lapic.id); 421#endif 422 423#if defined(DDB) --- 72 unchanged lines hidden (view full) --- 496 count++; 497 } else { 498 epp = &ep->next; 499 } 500 ep = *epp; 501 } 502 return (count); 503} |
502 | |