fix(build): Cross Build enviroment bug fixes (#264)

- Adding typecasting to make compilation work under MAC build environment

- Using go env variable instead of uname for determining platform

Signed-off-by: praveengt <praveen.gt@flipkart.com>
This commit is contained in:
praveengt 2020-12-21 11:52:36 +05:30 committed by GitHub
parent 2906d39d94
commit 0e3098920c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 15 deletions

View file

@ -373,9 +373,9 @@ func (ns *node) NodeGetVolumeStats(
var usage []*csi.VolumeUsage
usage = append(usage, &csi.VolumeUsage{
Unit: csi.VolumeUsage_BYTES,
Total: int64(sfs.Blocks) * sfs.Bsize,
Used: int64(sfs.Blocks-sfs.Bfree) * sfs.Bsize,
Available: int64(sfs.Bavail) * sfs.Bsize,
Total: int64(sfs.Blocks) * int64(sfs.Bsize),
Used: int64(sfs.Blocks-sfs.Bfree) * int64(sfs.Bsize),
Available: int64(sfs.Bavail) * int64(sfs.Bsize),
})
usage = append(usage, &csi.VolumeUsage{
Unit: csi.VolumeUsage_INODES,