Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Conversation

@mrunalp
Copy link
Contributor

@mrunalp mrunalp commented Feb 14, 2015

Signed-off-by: Mrunal Patel [email protected]

nsinit/config.go Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to be an int32? This is undefined for them (shifting word size).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, want to set it to 2^32. Seems to be working but if it is undefined then need to change this. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we cast the 1 as an int64 it should be fine :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting?

maxUid := int(int64(1) << 32)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, well 2^32 is not a valid integer (int32). The largest unsigned integer is 2^32 -1. Should this be max unsigned int or max signed int? (both int32)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is defined as unsigned uint32 in linux but is represented as int in golang.

@mrunalp
Copy link
Contributor Author

mrunalp commented Feb 14, 2015

Updated to use math.MaxInt32.

@vmarmol
Copy link
Contributor

vmarmol commented Feb 14, 2015

LGTM

vmarmol added a commit that referenced this pull request Feb 14, 2015
Add config generation for simple user namespace testing.
@vmarmol vmarmol merged commit 2b45128 into docker-archive:api Feb 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants