Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type of devices type #323

Merged
merged 2 commits into from
Feb 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The runtime may supply them however it likes (with [mknod][mknod.2], by bind mou

The following parameters can be specified:

* **`type`** *(char, required)* - type of device: `c`, `b`, `u` or `p`.
* **`type`** *(string, required)* - type of device: `c`, `b`, `u` or `p`.
More info in [mknod(1)][mknod.1].
* **`path`** *(string, required)* - full path to device inside container.
* **`major, minor`** *(int64, required unless **`type`** is `p`)* - [major, minor numbers][devices] for the device.
Expand All @@ -130,7 +130,7 @@ The following parameters can be specified:
"type": "c",
"major": 10,
"minor": 229,
"fileMode": 0666,
"fileMode": 438,
"uid": 0,
"gid": 0
},
Expand All @@ -139,7 +139,7 @@ The following parameters can be specified:
"type": "b",
"major": 8,
"minor": 0,
"fileMode": 0660,
"fileMode": 432,
"uid": 0,
"gid": 0
}
Expand Down Expand Up @@ -194,7 +194,7 @@ The runtime MUST apply entries in the listed order.
The following parameters can be specified:

* **`allow`** *(boolean, required)* - whether the entry is allowed or denied.
* **`type`** *(char, optional)* - type of device: `a` (all), `c` (char), or `b` (block).
* **`type`** *(string, optional)* - type of device: `a` (all), `c` (char), or `b` (block).
`null` or unset values mean "all", mapping to `a`.
* **`major, minor`** *(int64, optional)* - [major, minor numbers][devices] for the device.
`null` or unset values mean "all", mapping to [`*` in the filesystem API][cgroup-v1-devices].
Expand Down
4 changes: 2 additions & 2 deletions config_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ type Device struct {
// Path to the device.
Path string `json:"path"`
// Device type, block, char, etc.
Type rune `json:"type"`
Type string `json:"type"`
// Major is the device's major number.
Major int64 `json:"major"`
// Minor is the device's minor number.
Expand All @@ -256,7 +256,7 @@ type DeviceCgroup struct {
// Allow or deny
Allow bool `json:"allow"`
// Device type, block, char, etc.
Type *rune `json:"type,omitempty"`
Type *string `json:"type,omitempty"`
// Major is the device's major number.
Major *int64 `json:"major,omitempty"`
// Minor is the device's minor number.
Expand Down