summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/system.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-22 23:47:59 +0000
committerGitHub <noreply@github.com>2020-09-22 23:47:59 +0000
commit5cedd830f7275e8dc3382502908b846bfa57a3b8 (patch)
tree58b7e063484f07bec4d4ad978d14e8c72ecca158 /pkg/varlinkapi/system.go
parent4c48c71729ba61586852ddc2342b56c6086fb424 (diff)
parent16763c3df0eaf3b6e5b7883c60b59f051f811cda (diff)
downloadpodman-5cedd830f7275e8dc3382502908b846bfa57a3b8.tar.gz
podman-5cedd830f7275e8dc3382502908b846bfa57a3b8.tar.bz2
podman-5cedd830f7275e8dc3382502908b846bfa57a3b8.zip
Merge pull request #7734 from lsm5/fix-build-with-varlink
fix build with varlink
Diffstat (limited to 'pkg/varlinkapi/system.go')
-rw-r--r--pkg/varlinkapi/system.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/varlinkapi/system.go b/pkg/varlinkapi/system.go
index 9e4db2611..e5c766a6d 100644
--- a/pkg/varlinkapi/system.go
+++ b/pkg/varlinkapi/system.go
@@ -7,6 +7,7 @@ import (
"fmt"
"os"
goruntime "runtime"
+ "strconv"
"time"
"github.com/containers/image/v5/pkg/sysregistriesv2"
@@ -22,13 +23,18 @@ func (i *VarlinkAPI) GetVersion(call iopodman.VarlinkCall) error {
return err
}
+ int64APIVersion, err := strconv.ParseInt(versionInfo.APIVersion, 10, 64)
+ if err != nil {
+ return err
+ }
+
return call.ReplyGetVersion(
versionInfo.Version,
versionInfo.GoVersion,
versionInfo.GitCommit,
time.Unix(versionInfo.Built, 0).Format(time.RFC3339),
versionInfo.OsArch,
- versionInfo.APIVersion,
+ int64APIVersion,
)
}