From 32d4603d01b7ef6f7934252338236f195fb732bb Mon Sep 17 00:00:00 2001 From: Lomanic Date: Thu, 15 Oct 2020 23:17:33 +0200 Subject: [PATCH] [disk][darwin] fix build with latest golang.org/x/sys/unix Fixes #958 --- Gopkg.lock | 4 ++-- disk/disk_darwin.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 04ca6c2..ca6cf37 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -49,7 +49,7 @@ [[projects]] branch = "master" - digest = "1:e7b553682850788c6b266faaf25218ce901558e541102d12b2998cad99f6b4fb" + digest = "1:0afe79d034c63eea8c5977401f5fc135394751c1213ee6c991b0c6bec44f8f60" name = "golang.org/x/sys" packages = [ "internal/unsafeheader", @@ -59,7 +59,7 @@ "windows/svc/mgr", ] pruneopts = "UT" - revision = "76b94024e4b621e672466e8db3d7f084e7ddcad2" + revision = "e3ed0017c21142d3345308d92dcc7ad7020040c6" [[projects]] branch = "v3" diff --git a/disk/disk_darwin.go b/disk/disk_darwin.go index 64c41d7..d64d15c 100644 --- a/disk/disk_darwin.go +++ b/disk/disk_darwin.go @@ -64,9 +64,9 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro opts += ",nodev" } d := PartitionStat{ - Device: common.IntToString(stat.Mntfromname[:]), - Mountpoint: common.IntToString(stat.Mntonname[:]), - Fstype: common.IntToString(stat.Fstypename[:]), + Device: common.ByteToString(stat.Mntfromname[:]), + Mountpoint: common.ByteToString(stat.Mntonname[:]), + Fstype: common.ByteToString(stat.Fstypename[:]), Opts: opts, } if all == false { @@ -82,5 +82,5 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro } func getFsType(stat unix.Statfs_t) string { - return common.IntToString(stat.Fstypename[:]) + return common.ByteToString(stat.Fstypename[:]) }