Skip to content

Commit

Permalink
Removing commented out code and certain other artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@intel.com>
  • Loading branch information
Maciej "Iwan" Iwanowski committed Apr 1, 2020
1 parent dcb53e0 commit 73126c0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions nvm/machine_libipmctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package nvm

// #cgo pkg-config: libipmctl
// #include <nvm_management.h>
// #include <stdlib.h>
import "C"
import (
"fmt"
Expand Down Expand Up @@ -83,16 +82,11 @@ func getAvgPowerBudget() (uint, error) {
// getCapacities retrieves the total NVM capacity in bytes for memory mode and app direct mode
func getCapacities() (uint64, uint64, error) {
caps := C.struct_device_capacities{}
//capsMemory := C.malloc(C.ulong(unsafe.Sizeof(C.struct_device_capacities{})))
//defer C.free(capsMemory)
//caps := (*C.struct_device_capacities)(capsMemory)
klog.V(1).Infof("WTF? %#v", caps)
err := C.nvm_get_nvm_capacities(&caps)
if err != C.NVM_SUCCESS {
klog.Warningf("Unable to get NVM capacity. Status code: %d", err)
return uint64(0), uint64(0), fmt.Errorf("Unable to get NVM capacity. Status code: %d", err)
}
klog.V(1).Infof("FULL? %#v", caps)
return uint64(caps.memory_capacity), uint64(caps.app_direct_capacity), nil
}

Expand Down

0 comments on commit 73126c0

Please sign in to comment.