fix(deps): update github.com/containers/libhvee digest to e51be96

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2023-10-13 03:19:39 +00:00
committed by GitHub
parent 5afa949a43
commit 52112fc5c1
10 changed files with 48 additions and 24 deletions

2
go.mod
View File

@ -17,7 +17,7 @@ require (
github.com/containers/conmon v2.0.20+incompatible
github.com/containers/gvisor-tap-vsock v0.7.1
github.com/containers/image/v5 v5.28.0
github.com/containers/libhvee v0.4.1-0.20231005205143-fcf1cc2543b3
github.com/containers/libhvee v0.4.1-0.20231012183749-e51be96b4854
github.com/containers/ocicrypt v1.1.8
github.com/containers/psgo v1.8.0
github.com/containers/storage v1.50.3-0.20231005200628-e21971a94abb

4
go.sum
View File

@ -259,8 +259,8 @@ github.com/containers/gvisor-tap-vsock v0.7.1 h1:+Rc+sOPplrkQb/BUXeN0ug8TxjgyrIq
github.com/containers/gvisor-tap-vsock v0.7.1/go.mod h1:WSSsjcuYZkvP8i0J+Ht3LF8yvysn3krD5zxQ74wz7y0=
github.com/containers/image/v5 v5.28.0 h1:H4cWbdI88UA/mDb6SxMo3IxpmS1BSs/Kifvhwt9g048=
github.com/containers/image/v5 v5.28.0/go.mod h1:9aPnNkwHNHgGl9VlQxXEshvmOJRbdRAc1rNDD6sP2eU=
github.com/containers/libhvee v0.4.1-0.20231005205143-fcf1cc2543b3 h1:p0nglHRdtdrpPYyavMqf+Eqp4PkZNBAUWC0OuTjiXcE=
github.com/containers/libhvee v0.4.1-0.20231005205143-fcf1cc2543b3/go.mod h1:3lTcwI2g7qe8Ekgk9hdDxQeT9KrqXPilQvxJfIJp8TQ=
github.com/containers/libhvee v0.4.1-0.20231012183749-e51be96b4854 h1:9pHtBDAO1ZE0Cwhn3rfp7CfqpfeaYllG2o6wuDdxsa8=
github.com/containers/libhvee v0.4.1-0.20231012183749-e51be96b4854/go.mod h1:3lTcwI2g7qe8Ekgk9hdDxQeT9KrqXPilQvxJfIJp8TQ=
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA=
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
github.com/containers/luksy v0.0.0-20230808154129-d2d74a56682f h1:/HjLNYkVoUJNT4mm2dzGl63x7nD6YHxxI/k1kR0TkzA=

View File

@ -306,11 +306,6 @@ func getService(_ *wmiext.Service) (*wmiext.Service, error) {
return wmiext.NewLocalService(HyperVNamespace)
}
func (vm *VirtualMachine) list() ([]*HyperVConfig, error) {
return nil, ErrNotImplemented
}
func (vm *VirtualMachine) GetConfig(diskPath string) (*HyperVConfig, error) {
var (
diskSize uint64

View File

@ -14,12 +14,12 @@ const (
start vmState = 2
// Stops the job temporarily. The intention is to subsequently restart the job with 'Start'. It might be possible to
// enter the 'Service' state while suspended. (This is job-specific.)
suspend vmState = 3
suspend vmState = 3 //nolint: unused
// Stops the job cleanly, saves data, preserves the state, and shuts down all underlying processes'
// in an orderly manner.
terminate vmState = 4
terminate vmState = 4 //nolint: unused
//Terminates the job immediately with no requirement to save data or preserve the state.
kill vmState = 5
kill vmState = 5 //nolint: unused
)
type EnabledState uint16

View File

@ -76,7 +76,7 @@ func (e *Enum) Next() (instance *Instance, err error) {
uintptr(1), // [in] ULONG uCount,
uintptr(unsafe.Pointer(&apObjects)), // [out] IWbemClassObject **apObjects,
uintptr(unsafe.Pointer(&uReturned))) // [out] ULONG *puReturned)
if res < 0 {
if int(res) < 0 {
return nil, ole.NewError(res)
}

View File

@ -107,7 +107,7 @@ func initSecurity() {
uintptr(0), // [in, optional] void *pAuthList,
uintptr(EOAC_NONE), // [in] DWORD dwCapabilities,
uintptr(0)) // [in, optional] void *pReserved3
if res < 0 {
if int(res) < 0 {
logrus.Errorf("Unable to initialize COM security: %s", ole.NewError(res).Error())
}
}

View File

@ -14,6 +14,7 @@ import (
"unsafe"
"github.com/go-ole/go-ole"
"github.com/sirupsen/logrus"
)
const (
@ -353,7 +354,12 @@ func (i *Instance) GetAsAny(name string) (interface{}, CIMTYPE_ENUMERATION, WBEM
if err != nil {
return nil, cimType, flavor, err
}
defer variant.Clear()
defer func() {
if err := variant.Clear(); err != nil {
logrus.Error(err)
}
}()
// Since there is no type information only perform the stock conversion
result := convertToGenericValue(variant)
@ -367,7 +373,11 @@ func (i *Instance) GetAsString(name string) (value string, err error) {
if err != nil || variant == nil {
return "", err
}
defer variant.Clear()
defer func() {
if err := variant.Clear(); err != nil {
logrus.Error(err)
}
}()
// TODO: replace with something better
return fmt.Sprintf("%v", convertToGenericValue(variant)), nil
@ -449,7 +459,11 @@ func (i *Instance) Next() (done bool, name string, value interface{}, cimType CI
done, name, variant, cimType, flavor, err = i.NextAsVariant()
if err == nil && !done {
defer variant.Clear()
defer func() {
if err := variant.Clear(); err != nil {
logrus.Error(err)
}
}()
value = convertToGenericValue(variant)
}
@ -475,7 +489,7 @@ func (i *Instance) NextAsVariant() (bool, string, *ole.VARIANT, CIMTYPE_ENUMERAT
uintptr(unsafe.Pointer(&variant)), // [out] VARIANT *pVal,
uintptr(unsafe.Pointer(&cimType)), // [out, optional] CIMTYPE *pType,
uintptr(unsafe.Pointer(&flavor))) // [out, optional] long *plFlavor
if res < 0 {
if int(res) < 0 {
return false, "", nil, cimType, flavor, ole.NewError(res)
}
@ -483,7 +497,11 @@ func (i *Instance) NextAsVariant() (bool, string, *ole.VARIANT, CIMTYPE_ENUMERAT
return true, "", nil, cimType, flavor, nil
}
defer ole.SysFreeString((*int16)(unsafe.Pointer(strName)))
defer func() {
if err := ole.SysFreeString((*int16)(unsafe.Pointer(strName))); err != nil {
logrus.Error(err)
}
}()
name := ole.BstrToString(strName)
return false, name, &variant, cimType, flavor, nil
@ -501,7 +519,11 @@ func (i *Instance) GetAllProperties() (map[string]interface{}, error) {
return nil, err
}
defer i.EndEnumeration()
defer func() {
if err := i.EndEnumeration(); err != nil {
logrus.Error(err)
}
}()
for {
var name string

View File

@ -8,6 +8,7 @@ import (
"reflect"
"github.com/go-ole/go-ole"
"github.com/sirupsen/logrus"
)
type MethodExecutor struct {
@ -61,7 +62,13 @@ func (e *MethodExecutor) Out(name string, value interface{}) *MethodExecutor {
if e.err != nil || variant == nil {
return e
}
defer variant.Clear()
defer func() {
if err := variant.Clear(); err != nil {
logrus.Error(err)
}
}()
if _, ok := value.(**Instance); ok && cimType == CIM_REFERENCE {
path := variant.ToString()
result, e.err = e.service.GetObject(path)

View File

@ -199,7 +199,7 @@ func (s *Service) GetObject(objectPath string) (instance *Instance, err error) {
uintptr(0), // [in] IWbemContext *pCtx,
uintptr(unsafe.Pointer(&pObject)), // [out] IWbemClassObject **ppObject,
uintptr(0)) // [out] IWbemCallResult **ppCallResult)
if res < 0 {
if int(res) < 0 {
// returns WBEM_E_PROVIDER_NOT_FOUND when no entry found
return nil, ole.NewError(res)
}
@ -239,7 +239,7 @@ func (s *Service) CreateInstanceEnum(className string) (*Enum, error) {
uintptr(flags), // [in] long lFlags,
uintptr(0), // [in] IWbemContext *pCtx,
uintptr(unsafe.Pointer(&pEnum))) // [out] IEnumWbemClassObject **ppEnum)
if res < 0 {
if int(res) < 0 {
return nil, ole.NewError(res)
}
@ -277,7 +277,7 @@ func (s *Service) ExecMethod(className string, methodName string, inParams *Inst
uintptr(unsafe.Pointer(inParams.object)), // [in] IWbemClassObject *pInParams,
uintptr(unsafe.Pointer(&outParams)), // [out] IWbemClassObject **ppOutParams,
uintptr(0)) // [out] IWbemCallResult **ppCallResult)
if res < 0 {
if int(res) < 0 {
return nil, ole.NewError(res)
}

2
vendor/modules.txt vendored
View File

@ -304,7 +304,7 @@ github.com/containers/image/v5/transports
github.com/containers/image/v5/transports/alltransports
github.com/containers/image/v5/types
github.com/containers/image/v5/version
# github.com/containers/libhvee v0.4.1-0.20231005205143-fcf1cc2543b3
# github.com/containers/libhvee v0.4.1-0.20231012183749-e51be96b4854
## explicit; go 1.18
github.com/containers/libhvee/pkg/hypervctl
github.com/containers/libhvee/pkg/kvp/ginsu