From f7bdc1df9b7a80c799bcb3a0f15ed00df0657b7e Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Tue, 15 Sep 2015 14:18:14 -0400 Subject: [PATCH] calculate free blocks --- fst.equ | 3 +- id_disk.aii | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++- volume.aii | 11 +++++- 3 files changed, 117 insertions(+), 3 deletions(-) diff --git a/fst.equ b/fst.equ index 4872e07..45128bf 100644 --- a/fst.equ +++ b/fst.equ @@ -20,7 +20,7 @@ parent_inode ds.w 1 ;disk_inode ds v1_inode ;super ds v1_super -__end equ * +__end equ * IF *>=$d4 THEN AERROR 'dp -- too large.' ENDIF @@ -78,6 +78,7 @@ super ds v1_super first_inode_block ds.w 1 first_imap_block ds.w 1 first_zmap_block ds.w 1 +free_blocks ds.w 1 ; case-sensitive volume name. vname ds GSString32 diff --git a/id_disk.aii b/id_disk.aii index eca7eab..a0424fd 100644 --- a/id_disk.aii +++ b/id_disk.aii @@ -28,8 +28,11 @@ entry check_super entry build_vcr - import device_read + entry calc_free_blocks + entry bitcount + import device_read + import read_data_block id_disk procname export @@ -262,6 +265,10 @@ create_vcr ldy #vcr.first_inode_block sta [my_vcr],y + + + + vname ; also need to copy over the volume name... @@ -284,6 +291,11 @@ vname long m + ; store free blocks in the vcr? + jsr calc_free_blocks + bcs exit + + ; ~DebugHexDump