Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/evdev/evdev.c
| Show First 20 Lines • Show All 209 Lines • ▼ Show 20 Lines | evdev_sysctl_create(struct evdev_dev *evdev) | ||||
| char ev_unit_str[8]; | char ev_unit_str[8]; | ||||
| snprintf(ev_unit_str, sizeof(ev_unit_str), "%d", evdev->ev_unit); | snprintf(ev_unit_str, sizeof(ev_unit_str), "%d", evdev->ev_unit); | ||||
| sysctl_ctx_init(&evdev->ev_sysctl_ctx); | sysctl_ctx_init(&evdev->ev_sysctl_ctx); | ||||
| ev_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&evdev->ev_sysctl_ctx, | ev_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&evdev->ev_sysctl_ctx, | ||||
| SYSCTL_STATIC_CHILDREN(_kern_evdev_input), OID_AUTO, | SYSCTL_STATIC_CHILDREN(_kern_evdev_input), OID_AUTO, | ||||
| ev_unit_str, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "", | ev_unit_str, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "", | ||||
| "device index"); | "device_index"); | ||||
| SYSCTL_ADD_STRING(&evdev->ev_sysctl_ctx, | SYSCTL_ADD_STRING(&evdev->ev_sysctl_ctx, | ||||
| SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "name", CTLFLAG_RD, | SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "name", CTLFLAG_RD, | ||||
| evdev->ev_name, 0, | evdev->ev_name, 0, | ||||
| "Input device name"); | "Input device name"); | ||||
| SYSCTL_ADD_STRUCT(&evdev->ev_sysctl_ctx, | SYSCTL_ADD_STRUCT(&evdev->ev_sysctl_ctx, | ||||
| SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "id", CTLFLAG_RD, | SYSCTL_CHILDREN(ev_sysctl_tree), OID_AUTO, "id", CTLFLAG_RD, | ||||
| ▲ Show 20 Lines • Show All 950 Lines • Show Last 20 Lines | |||||