요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Input: sysrq reset sequence
A simple binding to represent a set of keys as described in
include/uapi/linux/input.h. This is to communicate a sequence of keys to the
sysrq driver. Upon holding the keys for a specified amount of time (if
specified) the system is sync'ed and reset.
Key sequences are global to the system but all the keys in a set must be coming
from the same input device.
The /chosen node should contain a 'linux,sysrq-reset-seq' child node to define
a set of keys.
Required property:
keyset: array of Linux keycodes, one keycode per cell.
Optional property:
timeout-ms: duration keys must be pressed together in milliseconds before
generating a sysrq. If omitted the system is rebooted immediately when a valid
sequence has been recognized.
Example:
chosen {
linux,sysrq-reset-seq {
keyset = <0x03
0x04
0x0a>;
timeout-ms = <3000>;
};
};
Would represent KEY_2, KEY_3 and KEY_9.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
SysRq reset key sequence
1-21이 binding은 `include/uapi/linux/input.h`에 정의된 key set을 나타내고 sysrq driver에 key sequence를 전달합니다. 지정한 시간 동안 모든 key를 누르면 system을 sync하고 reset하며, 시간을 지정하지 않을 수도 있습니다.
Key sequence는 system 전체에 적용되지만 한 set의 모든 key는 같은 input device에서 와야 합니다. `/chosen` node 아래에 `linux,sysrq-reset-seq` child를 두어 key set을 정의합니다. 필수 `keyset`은 cell마다 Linux keycode 하나를 담은 array입니다.
선택 `timeout-ms`는 sysrq를 생성하기 전에 key들을 함께 눌러야 하는 millisecond 단위 시간입니다. 생략하면 valid sequence를 인식하는 즉시 system을 reboot합니다.
같은 input device의 key set을 시간 조건과 함께 검증해 sync/reset합니다.
KEY_2+KEY_3+KEY_9 예제
22-33예제는 `/chosen/linux,sysrq-reset-seq`에 keycode `0x03`, `0x04`, `0x0a`와 3000 ms timeout을 지정합니다. 이 조합은 `KEY_2`, `KEY_3`, `KEY_9`을 뜻합니다.
chosen {
linux,sysrq-reset-seq {
keyset = <0x03
0x04
0x0a>;
timeout-ms = <3000>;
};
};
요약과 해설
input-reset.txt:1-33Chosen node의 global reset key sequence를 설명합니다.