diff --git a/getlayermountpath.go b/getlayermountpath.go index 910a2840b6..1b1e42bb65 100644 --- a/getlayermountpath.go +++ b/getlayermountpath.go @@ -41,17 +41,13 @@ func GetLayerMountPath(info DriverInfo, id string) (string, error) { mountPathLength = 0 // Call the procedure itself. - logrus.Debugf("Calling proc") + logrus.Debugf("Calling proc (1)") r1, _, _ := proc.Call( uintptr(unsafe.Pointer(&infop)), uintptr(unsafe.Pointer(idp)), uintptr(unsafe.Pointer(&mountPathLength)), uintptr(unsafe.Pointer(nil))) - use(unsafe.Pointer(&mountPathLength)) - use(unsafe.Pointer(&infop)) - use(unsafe.Pointer(idp)) - if r1 != 0 { err = fmt.Errorf(title+" - First Win32 API call returned error r1=%d err=%s id=%s flavour=%d", r1, syscall.Errno(r1), id, info.Flavour) @@ -67,12 +63,17 @@ func GetLayerMountPath(info DriverInfo, id string) (string, error) { mountPathp[0] = 0 // Call the procedure again + logrus.Debugf("Calling proc (2)") r1, _, _ = proc.Call( uintptr(unsafe.Pointer(&infop)), uintptr(unsafe.Pointer(idp)), uintptr(unsafe.Pointer(&mountPathLength)), uintptr(unsafe.Pointer(&mountPathp[0]))) + use(unsafe.Pointer(&mountPathLength)) + use(unsafe.Pointer(&infop)) + use(unsafe.Pointer(idp)) + if r1 != 0 { err = fmt.Errorf(title+" - Second Win32 API call returned error r1=%d errno=%d id=%s flavour=%d", r1, syscall.Errno(r1), id, info.Flavour)