From 057faea5c185d24cda40d310b0a80763ee46f4cc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 23 Dec 2020 09:17:35 +0000 Subject: Bump github.com/containers/storage from 1.24.3 to 1.24.4 Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.24.3 to 1.24.4. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.24.3...v1.24.4) Signed-off-by: dependabot-preview[bot] Signed-off-by: Daniel J Walsh --- .../Microsoft/hcsshim/computestorage/mount.go | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 vendor/github.com/Microsoft/hcsshim/computestorage/mount.go (limited to 'vendor/github.com/Microsoft/hcsshim/computestorage/mount.go') diff --git a/vendor/github.com/Microsoft/hcsshim/computestorage/mount.go b/vendor/github.com/Microsoft/hcsshim/computestorage/mount.go new file mode 100644 index 000000000..40652b99e --- /dev/null +++ b/vendor/github.com/Microsoft/hcsshim/computestorage/mount.go @@ -0,0 +1,27 @@ +package computestorage + +import ( + "context" + "fmt" + + "github.com/Microsoft/hcsshim/internal/interop" + "github.com/Microsoft/hcsshim/internal/oc" + "go.opencensus.io/trace" + "golang.org/x/sys/windows" +) + +// GetLayerVhdMountPath returns the volume path for a virtual disk of a writable container layer. +func GetLayerVhdMountPath(ctx context.Context, vhdHandle windows.Handle) (path string, err error) { + title := "hcsshim.GetLayerVhdMountPath" + ctx, span := trace.StartSpan(ctx, title) + defer span.End() + defer func() { oc.SetSpanStatus(span, err) }() + + var mountPath *uint16 + err = hcsGetLayerVhdMountPath(vhdHandle, &mountPath) + if err != nil { + return "", fmt.Errorf("failed to get vhd mount path: %s", err) + } + path = interop.ConvertAndFreeCoTaskMemString(mountPath) + return path, nil +} -- cgit v1.2.3-54-g00ecf