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

major and minor type issue #549

Open
Mashimiao opened this issue Aug 30, 2016 · 1 comment
Open

major and minor type issue #549

Mashimiao opened this issue Aug 30, 2016 · 1 comment
Milestone

Comments

@Mashimiao
Copy link

In config-linux.md:
type of major and minor is int64 in Device, but it's *int64 in DeviceCgroup.
I think they should be the same. Should they?

@wking
Copy link
Contributor

wking commented Aug 30, 2016

On Mon, Aug 29, 2016 at 07:09:30PM -0700, Ma Shimiao wrote:

In config-linux.md:
type of major and minor is int64 in Device, but it's *int64 in DeviceCgroup.
I think they should be the same. Should they?

You need the pointer type for DeviceCgroup, because the kernel allows
wildcards and null (in the config) maps to ‘*’ (in the kernel API)
1.

Device, on the other hand, wraps mknod. You need actual major/minors
in most mknod cases, although you need neither (and it should probably
be an error to set them) if ‘type’ is ‘p’ 2.

Because of the ‘p’ case, I think *uint (and I'm ok if folks want to
size that, since we only need to go up to a few hundred 3) makes
sense for both. But we probably want to handle the mknod wrapper in
JSON Schema with a oneOf where one case is for the ‘p’ type and one
case is for the other types.

@hqhq hqhq added this to the 1.1.0 milestone Dec 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants