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

(-)sys/dev/kbd/kbd.c (+1 lines)
Lines 1144-1149 Link Here
1144
			/* NON-LOCKING KEYS */
1144
			/* NON-LOCKING KEYS */
1145
			case SPSC: case RBT:  case SUSP: case STBY:
1145
			case SPSC: case RBT:  case SUSP: case STBY:
1146
			case DBG:  case NEXT: case PREV: case PNC:
1146
			case DBG:  case NEXT: case PREV: case PNC:
1147
			case HALT:
1147
				*accents = 0;
1148
				*accents = 0;
1148
				break;
1149
				break;
1149
			case BTAB:
1150
			case BTAB:
(-)sys/dev/syscons/syscons.c (+7 lines)
Lines 3105-3110 Link Here
3105
#endif
3105
#endif
3106
		break;
3106
		break;
3107
3107
3108
	    case HALT:
3109
#ifndef SC_DISABLE_REBOOT
3110
		halt_nice();
3111
#endif
3112
		break;
3113
		
3114
		
3108
#if NAPM > 0
3115
#if NAPM > 0
3109
	    case SUSP:
3116
	    case SUSP:
3110
		apm_suspend(PMST_SUSPEND);
3117
		apm_suspend(PMST_SUSPEND);
(-)sys/kern/kern_shutdown.c (+12 lines)
Lines 162-167 Link Here
162
	}
162
	}
163
	return;
163
	return;
164
}
164
}
165
void
166
halt_nice()
167
{
168
	/* Send a signal to init(8) and have it shutdown the world */
169
	if (initproc != NULL) {
170
		psignal(initproc, SIGUSR1);
171
	} else {
172
		/* No init(8) running, so simply reboot */
173
		boot(RB_NOSYNC|RB_HALT);
174
	}
175
	return;
176
}
165
static int	waittime = -1;
177
static int	waittime = -1;
166
static struct pcb dumppcb;
178
static struct pcb dumppcb;
167
179
(-)sys/pc98/pc98/syscons.c (+6 lines)
Lines 3124-3129 Link Here
3124
#endif
3124
#endif
3125
		break;
3125
		break;
3126
3126
3127
	    case HALT:
3128
#ifndef SC_DISABLE_REBOOT
3129
		halt_nice();
3130
#endif
3131
		break;
3132
3127
#if NAPM > 0
3133
#if NAPM > 0
3128
	    case SUSP:
3134
	    case SUSP:
3129
		apm_suspend(PMST_SUSPEND);
3135
		apm_suspend(PMST_SUSPEND);
(-)sys/sys/kbio.h (+1 lines)
Lines 171-176 Link Here
171
#define RCTRA		0x9e		/* right ctrl key / alt lock	*/
171
#define RCTRA		0x9e		/* right ctrl key / alt lock	*/
172
#define LALTA		0x9f		/* left alt key / alt lock	*/
172
#define LALTA		0x9f		/* left alt key / alt lock	*/
173
#define RALTA		0xa0		/* right alt key / alt lock	*/
173
#define RALTA		0xa0		/* right alt key / alt lock	*/
174
#define HALT		0xa1		/* halt machine */
174
175
175
#define F(x)		((x)+F_FN-1)
176
#define F(x)		((x)+F_FN-1)
176
#define	S(x)		((x)+F_SCR-1)
177
#define	S(x)		((x)+F_SCR-1)
(-)sys/sys/systm.h (+1 lines)
Lines 185-190 Link Here
185
185
186
/* Finalize the world. */
186
/* Finalize the world. */
187
void	shutdown_nice __P((void));
187
void	shutdown_nice __P((void));
188
void	halt_nice __P((void));
188
189
189
/*
190
/*
190
 * Kernel to clock driver interface.
191
 * Kernel to clock driver interface.
(-)usr.sbin/kbdcontrol/kbdcontrol.c (+8 lines)
Lines 197-202 Link Here
197
		return LALTA | 0x100;
197
		return LALTA | 0x100;
198
	case TRALTA:
198
	case TRALTA:
199
		return RALTA | 0x100;
199
		return RALTA | 0x100;
200
	case THALT:
201
		return HALT | 0x100;
200
	case TACC:
202
	case TACC:
201
		if (ACC(number) > L_ACC)
203
		if (ACC(number) > L_ACC)
202
			return -1;
204
			return -1;
Lines 428-433 Link Here
428
	case RALTA | 0x100:
430
	case RALTA | 0x100:
429
		fprintf(fp, " ralta ");
431
		fprintf(fp, " ralta ");
430
		break;
432
		break;
433
	case HALT | 0x100:
434
		fprintf(fp, " halt  ");
435
		break;
431
	default:
436
	default:
432
		if (value & 0x100) {
437
		if (value & 0x100) {
433
		 	if (val >= F_FN && val <= L_FN)
438
		 	if (val >= F_FN && val <= L_FN)
Lines 620-625 Link Here
620
			break;
625
			break;
621
		case RALTA:
626
		case RALTA:
622
			printf("RALTA, ");
627
			printf("RALTA, ");
628
			break;
629
		case HALT:
630
			printf(" HALT, ");
623
			break;
631
			break;
624
		default:
632
		default:
625
	 		if (value >= F_FN && value <= L_FN)
633
	 		if (value >= F_FN && value <= L_FN)
(-)usr.sbin/kbdcontrol/lex.h (+1 lines)
Lines 61-66 Link Here
61
#define TRCTRA		286
61
#define TRCTRA		286
62
#define TLALTA		287
62
#define TLALTA		287
63
#define TRALTA		288
63
#define TRALTA		288
64
#define THALT		289
64
65
65
extern int number;
66
extern int number;
66
extern char letter;
67
extern char letter;
(-)usr.sbin/kbdcontrol/lex.l (+1 lines)
Lines 68-73 Link Here
68
rctrla		{ return TRCTRA; }
68
rctrla		{ return TRCTRA; }
69
lalta|alta	{ return TLALTA; }
69
lalta|alta	{ return TLALTA; }
70
ralta		{ return TRALTA; }
70
ralta		{ return TRALTA; }
71
halt		{ return THALT; }
71
72
72
NUL|nul		{ number = 0; return TNUM; }
73
NUL|nul		{ number = 0; return TNUM; }
73
SOH|soh		{ number = 1; return TNUM; }
74
SOH|soh		{ number = 1; return TNUM; }

Return to bug 19273