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

Wrap Volume Mount Point management functions nicely for Go #176

Open
TBBle opened this issue Jul 27, 2020 · 1 comment · May be fixed by #187
Open

Wrap Volume Mount Point management functions nicely for Go #176

TBBle opened this issue Jul 27, 2020 · 1 comment · May be fixed by #187

Comments

@TBBle
Copy link
Contributor

TBBle commented Jul 27, 2020

I'm talking specifically about:

Although these are exposed in raw-form (using *uint16) by "golang.org/x/sys/windows", it'd be handy to have Go-typed wrappers around them. Over the last fortnight, I've created two PRs in different projects using the same wrappers for the first two APIs (microsoft/hcsshim#852 and containerd/containerd#4419).

I'm happy to contribute a PR, but I'd like to confirm that this is the right repo to put those wrappers into? It seems to fit nicely with the exposed EncodeReparsePoint and DecodeReparsePoint which also live here.

@TBBle
Copy link
Contributor Author

TBBle commented Jan 2, 2021

I just came across https://github.com/gentlemanautomaton/volmgmt which contains GetVolumeNameForVolumeMountPoint and GetVolumePathNamesForVolumeName but does not contain SetVolumeMountPoint or DeleteVolumeMountPoint.

That said, I already have (simple) implementations for the former two, I came across this repo while looking for APIs to use for formatting VHDs for a test.

TBBle added a commit to TBBle/go-winio that referenced this issue Jan 2, 2021
Fixes: microsoft#176

These provide Go-typed wrappers around the Win32 APIs backing them,
protecting the user from unsafe pointers and UTF-16 conversions.

Signed-off-by: Paul "TBBle" Hampson <[email protected]>
TBBle added a commit to TBBle/go-winio that referenced this issue Jan 12, 2021
Fixes: microsoft#176

These provide Go-typed wrappers around the Win32 APIs backing them,
protecting the user from unsafe pointers and UTF-16 conversions.

Signed-off-by: Paul "TBBle" Hampson <[email protected]>
TBBle added a commit to TBBle/go-winio that referenced this issue Jan 14, 2021
Fixes: microsoft#176

These provide Go-typed wrappers around the Win32 APIs backing them,
protecting the user from unsafe pointers and UTF-16 conversions.

utf16ToStringArray adapted from ConvertStringSetToSlice in hcsshim

Signed-off-by: Paul "TBBle" Hampson <[email protected]>
TBBle added a commit to TBBle/go-winio that referenced this issue Jan 14, 2021
Fixes: microsoft#176

These provide Go-typed wrappers around the Win32 APIs backing them,
protecting the user from unsafe pointers and UTF-16 conversions.

utf16ToStringArray adapted from ConvertStringSetToSlice in hcsshim

Signed-off-by: Paul "TBBle" Hampson <[email protected]>
TBBle added a commit to TBBle/go-winio that referenced this issue Feb 11, 2021
Fixes: microsoft#176

These provide Go-typed wrappers around the Win32 APIs backing them,
protecting the user from unsafe pointers and UTF-16 conversions.

utf16ToStringArray adapted from ConvertStringSetToSlice in hcsshim

Signed-off-by: Paul "TBBle" Hampson <[email protected]>
TBBle added a commit to TBBle/go-winio that referenced this issue Apr 21, 2021
Fixes: microsoft#176

These provide Go-typed wrappers around the Win32 APIs backing them,
protecting the user from unsafe pointers and UTF-16 conversions.

utf16ToStringArray adapted from ConvertStringSetToSlice in hcsshim

Signed-off-by: Paul "TBBle" Hampson <[email protected]>
TBBle added a commit to TBBle/go-winio that referenced this issue Apr 23, 2021
Fixes: microsoft#176

These provide Go-typed wrappers around the Win32 APIs backing them,
protecting the user from unsafe pointers and UTF-16 conversions.

utf16ToStringArray adapted from ConvertStringSetToSlice in hcsshim

Signed-off-by: Paul "TBBle" Hampson <[email protected]>
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

Successfully merging a pull request may close this issue.

1 participant