- Replace \text{clumpSize} with \mathrm{clumpSize} (2 instances)
- Remove Chinese character 危险, replace with WARNING - DANGEROUS
- Fixes: Command \DH unavailable in encoding OT1
- Fixes: Unicode character errors
Chapter 06 (mount): 306 lines
- Unix mount standards complete
- All options and mount process
- Journaling detection and Linux warnings
- fstab integration
- Common issues and portability
Chapter 07 (hfsutil): 250+ lines
- All commands: hformat, hmount, humount, hvol, hls, hcopy, hmkdir, hdel, hrename, hcd, hpwd, hattrib
- Complete options for each command
- Path syntax and character encoding
- Workflow example
- Testing reference
- Replaced \text{} with \mathrm{} in all equations (chapters 02 and 03)
- Fixed NFD table to use ASCII-only LaTeX accent commands instead of UTF-8
- Removed problematic Unicode characters (accented letters)
- All formulas now use properly escaped underscores
- PDF encoding compatibility ensured
Complete Bit-by-Bit Documentation:
- Every byte of MDB documented with exact offset (162 bytes total)
- All 16 bits of drAtrb explained individually with hex masks
- drNxtCNID: Reserved CNIDs 1-15 fully documented
- Volume name Pascal string format with byte examples
- Extent records complete structure (12 bytes, 3 descriptors)
Memory Layouts:
- Complete volume layout from byte 0 to end
- MDB field map with types and byte counts
- Node descriptor (14 bytes) for B-trees
- BTHeaderRec (106 bytes) complete structure
- Extent descriptor byte-by-byte breakdown
Critical Formulas:
- Alternate MDB: device_size - 1024 (NOT sector-based)
- Date conversion: Unix epoch offset (2082844800)
- Y2K28 limit calculation
- Volume size limits with 16-bit addressing
Endianness Details:
- Big-endian byte order for all multi-byte fields
- Examples of 16-bit and 32-bit value storage
- Code snippets showing correct/incorrect writing
- Hex dump verification commands
Oddities and Edge Cases:
- BD signature origin mystery
- Pascal vs C strings
- MacRoman character encoding differences
- Allocation block alignment requirements
- 16-bit addressing limitations (65,535 blocks max)
Verification:
- xxd commands for checking every critical field
- Expected hex output for validation
- Common errors and how to detect them
Goal: Complete reimplementation possible with only this document
Documentation System:
- Created professional PDF manual using LaTeX
- 10 chapters covering all aspects of hfsutils
- Compiled to 21-page PDF (199KB)
Chapters:
1. Introduction - Installation, quick start, overview
2. HFS Specification - Complete HFS format documentation
3. HFS+ Specification - HFS+ format (stub, to expand)
4-7. Utilities - mkfs, fsck, mount, hfsutil (stubs, to expand)
8. Implementation Details - Architecture (stub)
9. Testing - Test suite documentation (stub)
10. Appendix - Glossary, references, structures
Build System:
- make docs-pdf: Build PDF with pdflatex
- make docs-txt: Extract text from PDF
- make docs: Build all formats
- make install-docs: Install to /usr/share/doc/hfsutils
- make docs-clean: Clean build artifacts
.gitignore Updates:
- Ignore LaTeX temporary files (.aux, .log, .toc, etc.)
- Keep final PDFs for distribution
Requirements:
- TeXLive (pdflatex) for PDF generation
- poppler-utils (pdftotext) for text extraction
- Provides installation instructions if tools missing
Next Steps:
- Expand stub chapters with manpage content
- Add figures and diagrams
- Include implementation notes from doc/*.md
- Convert manpages to LaTeX format
Comprehensive update to fully integrate HFS+ journaling across the project:
### Build System Updates:
- **build.sh**: Enhanced with journaling-aware hfsck compilation
* Automatic fallback to manual compilation if autotools fails
* Proper journaling support compilation flags
* Improved error handling and reporting
- **Makefile**: Updated main Makefile with journaling support
* Enhanced hfsck build rule with manual fallback
* Proper dependency handling for journal.o
* Improved error handling for autotools issues
### Configuration Updates:
- **.gitattributes**: Comprehensive LF enforcement for all text files
* Added support for all file types (.c, .h, .sh, .md, .1, .8, etc.)
* Proper handling of build files and documentation
* Consistent line ending management
- **.gitignore**: Enhanced with journaling-specific ignores
* Added hfsutils.log and other log files
* Added hfsck build artifacts
* Better organization of ignored files
### Documentation Updates:
- **doc/man/fsck.hfs+.8**: Enhanced manual page with journaling documentation
* Detailed journaling support description
* Journal replay and validation features
* Comprehensive logging information
* Usage examples and troubleshooting
### Testing Infrastructure:
- **test/test_journaling.sh**: Comprehensive journaling test suite
* Version and functionality verification
* Error handling validation
* Binary symbol verification
* Log file creation testing
* HFS+ image creation and validation
- **test/run_tests.sh**: Integrated journaling tests
* Added test_hfsplus_journaling function
* Integrated into hfsplus and all test patterns
* Proper error handling and reporting
### Project Status:
- **TODO**: Updated with completed journaling features
- **CHANGELOG**: Added version 4.1.0 with journaling features
This completes the enterprise-level HFS+ journaling implementation with:
Full crash recovery support
Journal validation and repair
Comprehensive testing suite
Complete documentation
Robust build system
Professional logging and error handling
This major cleanup removes all legacy graphical interface components:
**Removed Components:**
- hfssh (Tcl shell interface)
- hfs (Tcl script wrapper)
- xhfs (X11/Tk GUI application)
- All associated Tcl/Tk source files and headers
- X11 bitmap images and resources
- Tcl test scripts and documentation
**Updated Build System:**
- Removed --with-tcl and --with-tk configure options
- Cleaned up Makefiles to remove Tcl/Tk targets
- Updated documentation to reflect changes
- Fixed missing string.h include in hpwd.c
**Why This Change:**
These 1990s-era components are no longer relevant for modern macOS
neither for moder Linux distros since GNOME 50 dropped X11 anyways:
- Require X11 server installation (XQuartz on MacOS)
- Linux move into Wayland making this a burder for "command line tool"
- Outdated GUI design and limited functionality
- Better alternatives exist (Finder, Disk Utility, modern tools)
- Maintenance burden without significant user benefit
The core command-line utilities remain fully functional and are the
primary value of this Update.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Reported to this fork from the good brockgs/hfsutils-for-apple-silicon
<Go and kidos to brockgs>