Skip to content

Comments

fix: unit mismatch in firmware backup space check#52

Merged
joshschmelzle merged 1 commit intoWLAN-Pi:mainfrom
joshschmelzle:main
Sep 26, 2025
Merged

fix: unit mismatch in firmware backup space check#52
joshschmelzle merged 1 commit intoWLAN-Pi:mainfrom
joshschmelzle:main

Conversation

@joshschmelzle
Copy link
Member

Type of change

  • Bug fix (non-breaking change that fixes something)
  • Documentation update (readme, changelog, man page, etc.)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature changing existing functionality)
  • Code quality improvement (refactor, performance improvements)
  • Other (please specify):

Breaking change

  • What functionality breaks?
  • Why does it break?
  • How should it be migrated?
  • Are there any backward-compatible alternatives?

Proposed change

The check_space() function was comparing bytes (from stat) against
kilobytes (from df), causing false "insufficient space" errors.

Testing

  • Did you add new automated tests? If yes, explain which edge cases are covered.
  • Does this change affect any existing tests? If so, how did you adjust them?
  • Please provide test run results or screenshots if applicable.

Before change:

wlanpi@wlanpi-fba:~ $ wlanpi-iwlwifi-ucode-92 disable
[2025-09-19 11:17:41] Creating original backup...
[2025-09-19 11:17:41] ERROR: Insufficient space for backup ...

After change:

wlanpi@wlanpi-fba:~ $ wlanpi-iwlwifi-ucode-92 disable
[2025-09-19 11:22:52] Creating original backup...
[2025-09-19 11:22:52] Original backup created successfully ...
[2025-09-19 11:22:52] Moving firmware file to disabled state ...
[2025-09-19 11:22:52] Firmware disabled ...
[2025-09-19 11:22:52] Resetting wireless modules ...
[2025-09-19 11:22:55] Wireless modules reset complete ...

Checklist

  • I have read the contribution guidelines and policies
  • I have targeted this PR against the correct git branch (this can vary depending on the default branch of the repo)
  • I ran the test suite and verified it succeeded
  • I linked a GitHub issue to this PR (in the next section).
  • I have updated the changelog (if applicable)
  • I have added or updated the documentation (if applicable)

Related Issues/PRs

@joshschmelzle joshschmelzle self-assigned this Sep 26, 2025
@joshschmelzle joshschmelzle added the bug Something isn't working label Sep 26, 2025
@joshschmelzle joshschmelzle merged commit 2650b9b into WLAN-Pi:main Sep 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant