Skip to content

Commit

Permalink
Merge pull request #373 from pixlise/bugfix/lambda-disk-space
Browse files Browse the repository at this point in the history
Fix printing of disk free space
  • Loading branch information
pnemere authored Dec 8, 2024
2 parents 6f7c380 + cd4d0db commit 03a86f7
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions core/utils/diskfree_nonwindows.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ func GetDiskAvailableBytes() (uint64, error) {
return 0, err
}

fmt.Sprintf("Bavail: %v", stat.Bavail)
fmt.Sprintf("Bfree: %v", stat.Bfree)
fmt.Sprintf("Blocks: %v", stat.Blocks)
fmt.Sprintf("Bsize: %v", stat.Bsize)
fmt.Sprintf("Ffree: %v", stat.Ffree)
fmt.Sprintf("Files: %v", stat.Files)
fmt.Sprintf("Flags: %v", stat.Flags)
fmt.Sprintf("Flags_ext: %v", stat.Flags_ext)
fmt.Sprintf("Fsid: %v", stat.Fsid.Val)
fmt.Sprintf("Fssubtype: %v", stat.Fssubtype)
fmt.Sprintf("Fstypename: %v", stat.Fstypename)
fmt.Sprintf("Iosize: %v", stat.Iosize)
fmt.Sprintf("Mntfromname: %v", stat.Mntfromname)
fmt.Sprintf("Mntonname: %v", stat.Mntonname)
fmt.Sprintf("Owner: %v", stat.Owner)
fmt.Sprintf("Type: %v", stat.Type)
fmt.Printf("Bavail: %v\n", stat.Bavail)
fmt.Printf("Bfree: %v\n", stat.Bfree)
fmt.Printf("Blocks: %v\n", stat.Blocks)
fmt.Printf("Bsize: %v\n", stat.Bsize)
fmt.Printf("Ffree: %v\n", stat.Ffree)
fmt.Printf("Files: %v\n", stat.Files)
fmt.Printf("Flags: %v\n", stat.Flags)
fmt.Printf("Flags_ext: %v\n", stat.Flags_ext)

Check failure on line 31 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / build

stat.Flags_ext undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Flags_ext)

Check failure on line 31 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / test

stat.Flags_ext undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Flags_ext)

Check failure on line 31 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / build

stat.Flags_ext undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Flags_ext)

Check failure on line 31 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / test

stat.Flags_ext undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Flags_ext)
fmt.Printf("Fsid: %v\n", stat.Fsid.Val)
fmt.Printf("Fssubtype: %v\n", stat.Fssubtype)

Check failure on line 33 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / build

stat.Fssubtype undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Fssubtype)

Check failure on line 33 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / test

stat.Fssubtype undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Fssubtype)

Check failure on line 33 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / build

stat.Fssubtype undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Fssubtype)

Check failure on line 33 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / test

stat.Fssubtype undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Fssubtype)
fmt.Printf("Fstypename: %v\n", stat.Fstypename)

Check failure on line 34 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / build

stat.Fstypename undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Fstypename)

Check failure on line 34 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / test

stat.Fstypename undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Fstypename)

Check failure on line 34 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / build

stat.Fstypename undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Fstypename)

Check failure on line 34 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / test

stat.Fstypename undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Fstypename)
fmt.Printf("Iosize: %v\n", stat.Iosize)

Check failure on line 35 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / build

stat.Iosize undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Iosize)

Check failure on line 35 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / test

stat.Iosize undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Iosize)

Check failure on line 35 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / build

stat.Iosize undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Iosize)

Check failure on line 35 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / test

stat.Iosize undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Iosize)
fmt.Printf("Mntfromname: %v\n", stat.Mntfromname)

Check failure on line 36 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / build

stat.Mntfromname undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Mntfromname)

Check failure on line 36 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / test

stat.Mntfromname undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Mntfromname)

Check failure on line 36 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / build

stat.Mntfromname undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Mntfromname)

Check failure on line 36 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / test

stat.Mntfromname undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Mntfromname)
fmt.Printf("Mntonname: %v\n", stat.Mntonname)

Check failure on line 37 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / build

stat.Mntonname undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Mntonname)

Check failure on line 37 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / test

stat.Mntonname undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Mntonname)

Check failure on line 37 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / build

stat.Mntonname undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Mntonname)

Check failure on line 37 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / test

stat.Mntonname undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Mntonname)
fmt.Printf("Owner: %v\n", stat.Owner)

Check failure on line 38 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / build

stat.Owner undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Owner)

Check failure on line 38 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / prerelease / test

stat.Owner undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Owner)

Check failure on line 38 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / build

stat.Owner undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Owner)

Check failure on line 38 in core/utils/diskfree_nonwindows.go

View workflow job for this annotation

GitHub Actions / release / test

stat.Owner undefined (type "golang.org/x/sys/unix".Statfs_t has no field or method Owner)
fmt.Printf("Type: %v\n", stat.Type)

// Available blocks * size per block = available space in bytes
return stat.Bavail * uint64(stat.Bsize), nil
Expand Down

0 comments on commit 03a86f7

Please sign in to comment.