Skip to content

Conversation

@aluedeke
Copy link
Collaborator

@aluedeke aluedeke commented Dec 1, 2025

Summary

Remove erroneous /8 division when printing BlockSize in the diskspace command.

Problem

The diskspace command was reporting 512 bytes as the block size instead of the actual 4096 bytes. This happened because the code incorrectly divided the BlockSize by 8:

fmt.Printf("  BlockSize: %d\n", info.BlockSize/8)

The value from the device is already in bytes, not bits.

Before

      Model: iPhone12,8
  BlockSize: 512
  FreeSpace: 36.7GB

After

      Model: iPhone12,8
  BlockSize: 4096
  FreeSpace: 36.7GB

References

Fixes #640

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

diskspace command reports incorrect block size (512 bytes)

2 participants