View | Details | Raw Unified | Return to bug 25605
Collapse All | Expand All

(-)syscons.c (-9 / +10 lines)
Lines 118-123 Link Here
118
SYSCTL_INT(_machdep, OID_AUTO, enable_panic_key, CTLFLAG_RW, &enable_panic_key,
118
SYSCTL_INT(_machdep, OID_AUTO, enable_panic_key, CTLFLAG_RW, &enable_panic_key,
119
	   0, "");
119
	   0, "");
120
120
121
static	int		disable_halt_key;
122
SYSCTL_INT(_machdep, OID_AUTO, disable_halt_key, CTLFLAG_RW, &disable_halt_key,
123
	   0, "");
124
       
121
#define SC_CONSOLECTL	255
125
#define SC_CONSOLECTL	255
122
126
123
#define VIRTUAL_TTY(sc, x) (SC_DEV((sc), (x))->si_tty)
127
#define VIRTUAL_TTY(sc, x) (SC_DEV((sc), (x))->si_tty)
Lines 3100-3120 Link Here
3100
		break;
3104
		break;
3101
3105
3102
	    case RBT:
3106
	    case RBT:
3103
#ifndef SC_DISABLE_REBOOT
3107
	    if (!disable_halt_key)
3104
		shutdown_nice(0);
3108
			shutdown_nice(0);
3105
#endif
3106
		break;
3109
		break;
3107
3110
3108
	    case HALT:
3111
	    case HALT:
3109
#ifndef SC_DISABLE_REBOOT
3112
	    if (!disable_halt_key)
3110
		shutdown_nice(RB_HALT);
3113
			shutdown_nice(RB_HALT);
3111
#endif
3112
		break;
3114
		break;
3113
3115
3114
	    case PDWN:
3116
	    case PDWN:
3115
#ifndef SC_DISABLE_REBOOT
3117
	    if (!disable_halt_key)
3116
		shutdown_nice(RB_HALT|RB_POWEROFF);
3118
			shutdown_nice(RB_HALT|RB_POWEROFF);
3117
#endif
3118
		break;
3119
		break;
3119
3120
3120
#if NAPM > 0
3121
#if NAPM > 0

Return to bug 25605