From 03d5a98636172404341449cec81695873edd6704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20L=C3=BCdeke?= Date: Sun, 30 Nov 2025 14:08:01 +0100 Subject: [PATCH] Fix diskspace command reporting incorrect block size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove erroneous /8 division when printing BlockSize. The value from the device is already in bytes, not bits. This was causing 4096 byte blocks to be reported as 512 bytes. Fixes #640 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 40a6102f..b11aa499 100644 --- a/main.go +++ b/main.go @@ -1346,7 +1346,7 @@ The commands work as following: exitIfError("get device info push failed", err) } fmt.Printf(" Model: %s\n", info.Model) - fmt.Printf(" BlockSize: %d\n", info.BlockSize/8) + fmt.Printf(" BlockSize: %d\n", info.BlockSize) fmt.Printf(" FreeSpace: %s\n", ios.ByteCountDecimal(int64(info.FreeBytes))) fmt.Printf(" UsedSpace: %s\n", ios.ByteCountDecimal(int64(info.TotalBytes-info.FreeBytes))) fmt.Printf(" TotalSpace: %s\n", ios.ByteCountDecimal(int64(info.TotalBytes)))