修复了一些已知问题

This commit is contained in:
MengMengCode
2026-06-07 20:16:00 +08:00
parent 08a1a057e7
commit 2ad17fa520
14 changed files with 549 additions and 79 deletions
+4 -3
View File
@@ -8,10 +8,11 @@ import (
"strconv"
"strings"
"sync"
"syscall"
"time"
"clicd/internal/lxc"
"golang.org/x/sys/unix"
)
type HostInfo struct {
@@ -135,8 +136,8 @@ func getMemoryInfo() MemoryInfo {
}
func getDiskInfo() DiskInfo {
var stat syscall.Statfs_t
if err := syscall.Statfs("/", &stat); err != nil {
var stat unix.Statfs_t
if err := unix.Statfs("/", &stat); err != nil {
// Try command-based fallback
cmd := exec.Command("df", "-BG", "/")
output, err := cmd.Output()