Skip to content

Commit 95e1259

Browse files
author
Mrunal Patel
committed
Merge pull request opencontainers#323 from hqhq/hq_fix_devices_example
Fix type of devices type
2 parents 9a3cc9a + ccf3a24 commit 95e1259

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

config-linux.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ The runtime may supply them however it likes (with [mknod][mknod.2], by bind mou
112112

113113
The following parameters can be specified:
114114

115-
* **`type`** *(char, required)* - type of device: `c`, `b`, `u` or `p`.
115+
* **`type`** *(string, required)* - type of device: `c`, `b`, `u` or `p`.
116116
More info in [mknod(1)][mknod.1].
117117
* **`path`** *(string, required)* - full path to device inside container.
118118
* **`major, minor`** *(int64, required unless **`type`** is `p`)* - [major, minor numbers][devices] for the device.
@@ -130,7 +130,7 @@ The following parameters can be specified:
130130
"type": "c",
131131
"major": 10,
132132
"minor": 229,
133-
"fileMode": 0666,
133+
"fileMode": 438,
134134
"uid": 0,
135135
"gid": 0
136136
},
@@ -139,7 +139,7 @@ The following parameters can be specified:
139139
"type": "b",
140140
"major": 8,
141141
"minor": 0,
142-
"fileMode": 0660,
142+
"fileMode": 432,
143143
"uid": 0,
144144
"gid": 0
145145
}
@@ -194,7 +194,7 @@ The runtime MUST apply entries in the listed order.
194194
The following parameters can be specified:
195195

196196
* **`allow`** *(boolean, required)* - whether the entry is allowed or denied.
197-
* **`type`** *(char, optional)* - type of device: `a` (all), `c` (char), or `b` (block).
197+
* **`type`** *(string, optional)* - type of device: `a` (all), `c` (char), or `b` (block).
198198
`null` or unset values mean "all", mapping to `a`.
199199
* **`major, minor`** *(int64, optional)* - [major, minor numbers][devices] for the device.
200200
`null` or unset values mean "all", mapping to [`*` in the filesystem API][cgroup-v1-devices].

config_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ type Device struct {
238238
// Path to the device.
239239
Path string `json:"path"`
240240
// Device type, block, char, etc.
241-
Type rune `json:"type"`
241+
Type string `json:"type"`
242242
// Major is the device's major number.
243243
Major int64 `json:"major"`
244244
// Minor is the device's minor number.
@@ -256,7 +256,7 @@ type DeviceCgroup struct {
256256
// Allow or deny
257257
Allow bool `json:"allow"`
258258
// Device type, block, char, etc.
259-
Type *rune `json:"type,omitempty"`
259+
Type *string `json:"type,omitempty"`
260260
// Major is the device's major number.
261261
Major *int64 `json:"major,omitempty"`
262262
// Minor is the device's minor number.

0 commit comments

Comments
 (0)