[mem][solaris] don't hardcode path to prtconf in error message

This commit is contained in:
Ville Skyttä 2021-10-22 18:22:07 +03:00
parent d863ea4cc5
commit 768c3b1888
2 changed files with 2 additions and 4 deletions

View File

@ -4,7 +4,6 @@ package mem
import (
"context"
"errors"
"fmt"
"os/exec"
"regexp"
@ -84,7 +83,7 @@ func globalZoneMemoryCapacity() (uint64, error) {
match := globalZoneMemoryCapacityMatch.FindAllStringSubmatch(string(out), -1)
if len(match) != 1 {
return 0, errors.New("memory size not contained in output of /usr/sbin/prtconf")
return 0, fmt.Errorf("memory size not contained in output of %q", prtconf)
}
totalMB, err := strconv.ParseUint(match[0][1], 10, 64)

View File

@ -4,7 +4,6 @@ package mem
import (
"context"
"errors"
"fmt"
"os/exec"
"regexp"
@ -84,7 +83,7 @@ func globalZoneMemoryCapacity() (uint64, error) {
match := globalZoneMemoryCapacityMatch.FindAllStringSubmatch(string(out), -1)
if len(match) != 1 {
return 0, errors.New("memory size not contained in output of /usr/sbin/prtconf")
return 0, fmt.Errorf("memory size not contained in output of %q", prtconf)
}
totalMB, err := strconv.ParseUint(match[0][1], 10, 64)