요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
1
What: /sys/devices
2
Date: February 2006
3
Contact: Greg Kroah-Hartman <[email protected]>
4
Description:
5
The /sys/devices tree contains a snapshot of the
6
internal state of the kernel device tree. Devices will
7
be added and removed dynamically as the machine runs,
8
and between different kernel versions, the layout of the
9
devices within this tree will change.
11
Please do not rely on the format of this tree because of
12
this. If a program wishes to find different things in
13
the tree, please use the /sys/class structure and rely
14
on the symlinks there to point to the proper location
15
within the /sys/devices tree of the individual devices.
16
Or rely on the uevent messages to notify programs of
17
devices being added and removed from this tree to find
18
the location of those devices.
20
Note that sometimes not all devices along the directory
21
chain will have emitted uevent messages, so userspace
22
programs must be able to handle such occurrences.
24
Users:
25
udev <[email protected]>
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Dynamic kernel device-tree snapshot
1-25| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices |
| Date | 2006년 2월 |
| Contact | Greg Kroah-Hartman <[email protected]> |
| Description | /sys/devices tree는 kernel device tree의 internal state snapshot을 담습니다. Machine이 동작하는 동안 device가 동적으로 추가·제거되고 kernel version 사이에도 tree 안의 device layout이 바뀝니다. 따라서 이 tree의 format에 의존하지 마십시오. Program이 tree에서 항목을 찾으려면 /sys/class 구조를 사용하고 그 symlink가 개별 device의 올바른 /sys/devices 위치를 가리키는 데 의존해야 합니다. 또는 uevent message로 device의 추가·제거를 통지받아 위치를 찾으십시오. Directory chain에 있는 모든 device가 uevent를 낸 것은 아닐 수 있으므로 userspace program은 그런 경우를 처리할 수 있어야 합니다. |
| Users | udev <[email protected]> |
/sys/devices는 dynamic snapshot→Raw directory layout에 의존하지 않음→/sys/class symlink로 device 위치 resolve→uevent로 add/remove 추적→중간 device의 missing uevent도 처리
Raw /sys/devices layout 대신 class links와 uevent를 조합합니다.
Dynamic kernel device-tree snapshot
sysfs-devices:1-25/sys/devices layout은 runtime과 kernel version에 따라 바뀌므로 stable format으로 취급할 수 없습니다. Userspace는 /sys/class symlink 또는 uevent를 사용하고 directory chain 일부가 uevent를 내지 않는 경우도 처리해야 합니다.