Make shell:disk_list_partitions() more verbose

Show disk sector size and capacity, partition's size and start sector.
This commit is contained in:
2023-01-03 20:39:10 +00:00
parent b0be99a9e9
commit f291ffc03b
32 changed files with 273 additions and 77 deletions

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_ftype0_s05k_b2k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> ls70 /hd0/1/sf_empty
status = 6 end_of_file, count = 2
total = 2

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_files_s05k_b4k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> # zero length
/> read70 /hd0/1/no_hole 0 0 -b
status = 0 success, count = 0

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_files_s05k_b4k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> stat70 /hd0/1/
status = 0 success
attr: ----f

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_files_s05k_b4k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> pwd
/
/> cd /hd0

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_files_s05k_b4k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> # hole begin
/> # zero length
/> read70 /hd0/1/hole_begin 0 0 -b

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_ftype1_s05k_b2k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> stat70 /hd0/1/sf_empty
status = 0 success
attr: ----f

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_ftype0_s4k_b4k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=4096, capacity=77056 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=256, length=76800 (300 MiB)
/> ls70 /hd0/1/sf
status = 6 end_of_file, count = 5
total = 5

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_ftype0_s05k_b2k_n8k_xattr.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> ls70 /hd0/1/sf_empty
status = 6 end_of_file, count = 2
total = 2

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_ftype0_s05k_b2k_n8k_xattr.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> stat70 /hd0/1/sf_empty
status = 0 success
attr: ----f

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_unicode.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/>
/> stat80 /hd0/1/dir0
status = 0 success

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v5_ftype1_s05k_b2k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> ls70 /hd0/1/sf_empty
status = 6 end_of_file, count = 2
total = 2

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v5_ftype1_s05k_b2k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> stat70 /hd0/1/sf_empty
status = 0 success
attr: ----f

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v5_files_s05k_b4k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> # hole begin
/> # zero length
/> read70 /hd0/1/hole_begin 0 0 -b

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v5_files_s05k_b4k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> # zero length
/> read70 /hd0/1/no_hole 0 0 -b
status = 0 success, count = 0

View File

@@ -2,7 +2,8 @@
/> set_mouse_pos_screen 40 30
/> #disk_add ../img/kolibri.img rd -c 0
/> ramdisk_init ../img/kolibri.img
/rd/1: fat
/rd: sector_size=512, capacity=2880 (1440 kiB), num_partitions=1
/rd/1: fs=fat, start=0, length=2880 (1440 kiB)
/> set_skin /sys/DEFAULT.SKN
status: 0
/> window_redraw 1

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_files_s05k_b4k_n8k.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/>
/> read70 /hd0/1/4GiB_plus 0x3ff4 11 -b
status = 0 success, count = 11

View File

@@ -1,7 +1,9 @@
/> umka_init
/> disk_add ../img/jfs.img hd0 -c 0
/hd0/1: ???
/hd0: sector_size=512, capacity=34816 (17 MiB), num_partitions=1
/hd0/1: fs=???, start=2048, length=32768 (16 MiB)
/> disk_del hd0
/> disk_add ../img/xfs_borg_bit.img hd0 -c 0
/hd0/1: ???
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=???, start=2048, length=614400 (300 MiB)
/> disk_del hd0

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_v4_btrees_l2.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/>
/> ls80 /hd0/1/dir_btree_l2 -f 0 -c 1
status = 0 success, count = 1

View File

@@ -1,7 +1,8 @@
/> umka_set_boot_params --x_res 44 --y_res 44
/> umka_init
/> ramdisk_init ../img/kolibri.img
/rd/1: fat
/rd: sector_size=512, capacity=2880 (1440 kiB), num_partitions=1
/rd/1: fs=fat, start=0, length=2880 (1440 kiB)
/> set_skin /sys/DEFAULT.SKN
status: 0
/>

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/fat32_test0.img hd0 -c 0
/hd0/1: fat
/hd0: sector_size=512, capacity=614400 (300 MiB), num_partitions=1
/hd0/1: fs=fat, start=0, length=614376 (307188 kiB)
/> ls80 /hd0/1/
status = 0 success, count = 100
total = 107

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/exfat_s05k_c16k_b16k.img hd0 -c 0
/hd0/1: exfat
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=exfat, start=2048, length=614400 (300 MiB)
/>
/> ls70 /hd0/1/dir_0 -f 0 -c 0
/> ls70 /hd0/1/dir_0 -f 0 -c 1

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/exfat_s05k_c8k_b8k.img hd0 -c 0
/hd0/1: exfat
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=exfat, start=2048, length=614400 (300 MiB)
/>
/> stat70 /hd0/1/dir_000
status = 0 success

View File

@@ -1,7 +1,8 @@
/> umka_init
/> #set_mouse_pos_screen 40 30
/> ramdisk_init ../img/kolibri.img
/rd/1: fat
/rd: sector_size=512, capacity=2880 (1440 kiB), num_partitions=1
/rd/1: fs=fat, start=0, length=2880 (1440 kiB)
/> set_skin /sys/DEFAULT.SKN
status: 0
/>

View File

@@ -1,7 +1,8 @@
/> umka_init
/>
/> ramdisk_init ../img/kolibri.img
/rd/1: fat
/rd: sector_size=512, capacity=2880 (1440 kiB), num_partitions=1
/rd/1: fs=fat, start=0, length=2880 (1440 kiB)
/> set_skin /sys/DEFAULT.SKN
status: 0
/>

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_bigtime.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=616448 (301 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=614400 (300 MiB)
/> ls70 /hd0/1/
status = 6 end_of_file, count = 8
total = 8

View File

@@ -1,6 +1,7 @@
/> umka_init
/> disk_add ../img/xfs_nrext64.img hd0 -c 0
/hd0/1: xfs
/hd0: sector_size=512, capacity=6146048 (3001 MiB), num_partitions=1
/hd0/1: fs=xfs, start=2048, length=6144000 (3000 MiB)
/> stat70 /hd0/1/dir_sf
status = 0 success
attr: ----f

55
test/059_#gpt_all.ref.log Normal file
View File

@@ -0,0 +1,55 @@
/> umka_init
/> disk_add ../img/gpt_partitions_s05k.img hd0 -c 0
/hd0: sector_size=512, capacity=2097152 (1 GiB), num_partitions=24
/hd0/1: fs=???, start=2048, length=2048 (1 MiB)
/hd0/2: fs=???, start=4096, length=2048 (1 MiB)
/hd0/3: fs=???, start=8192, length=2048 (1 MiB)
/hd0/4: fs=???, start=6144, length=2048 (1 MiB)
/hd0/5: fs=???, start=10240, length=2048 (1 MiB)
/hd0/6: fs=???, start=12288, length=2048 (1 MiB)
/hd0/7: fs=???, start=14336, length=2048 (1 MiB)
/hd0/8: fs=???, start=16384, length=2048 (1 MiB)
/hd0/9: fs=???, start=18432, length=2048 (1 MiB)
/hd0/10: fs=???, start=20480, length=2048 (1 MiB)
/hd0/11: fs=???, start=22528, length=2048 (1 MiB)
/hd0/12: fs=???, start=24576, length=2048 (1 MiB)
/hd0/13: fs=???, start=26624, length=2048 (1 MiB)
/hd0/14: fs=???, start=28672, length=2048 (1 MiB)
/hd0/15: fs=???, start=30720, length=2048 (1 MiB)
/hd0/16: fs=???, start=32768, length=2048 (1 MiB)
/hd0/17: fs=???, start=34816, length=2048 (1 MiB)
/hd0/18: fs=???, start=36864, length=2048 (1 MiB)
/hd0/19: fs=???, start=38912, length=2048 (1 MiB)
/hd0/20: fs=???, start=40960, length=2048 (1 MiB)
/hd0/21: fs=???, start=43008, length=2048 (1 MiB)
/hd0/22: fs=???, start=45056, length=2048 (1 MiB)
/hd0/23: fs=???, start=47104, length=2048 (1 MiB)
/hd0/24: fs=???, start=49152, length=2048 (1 MiB)
/> disk_del hd0
/> disk_add ../img/gpt_partitions_s4k.img hd0 -c 0
/hd0: sector_size=4096, capacity=262144 (1 GiB), num_partitions=24
/hd0/1: fs=???, start=256, length=256 (1 MiB)
/hd0/2: fs=???, start=512, length=256 (1 MiB)
/hd0/3: fs=???, start=1024, length=256 (1 MiB)
/hd0/4: fs=???, start=768, length=256 (1 MiB)
/hd0/5: fs=???, start=1280, length=256 (1 MiB)
/hd0/6: fs=???, start=1536, length=256 (1 MiB)
/hd0/7: fs=???, start=1792, length=256 (1 MiB)
/hd0/8: fs=???, start=2048, length=256 (1 MiB)
/hd0/9: fs=???, start=2304, length=256 (1 MiB)
/hd0/10: fs=???, start=2560, length=256 (1 MiB)
/hd0/11: fs=???, start=2816, length=256 (1 MiB)
/hd0/12: fs=???, start=3072, length=256 (1 MiB)
/hd0/13: fs=???, start=3328, length=256 (1 MiB)
/hd0/14: fs=???, start=3584, length=256 (1 MiB)
/hd0/15: fs=???, start=3840, length=256 (1 MiB)
/hd0/16: fs=???, start=4096, length=256 (1 MiB)
/hd0/17: fs=???, start=4352, length=256 (1 MiB)
/hd0/18: fs=???, start=4608, length=256 (1 MiB)
/hd0/19: fs=???, start=4864, length=256 (1 MiB)
/hd0/20: fs=???, start=5120, length=256 (1 MiB)
/hd0/21: fs=???, start=5376, length=256 (1 MiB)
/hd0/22: fs=???, start=5632, length=256 (1 MiB)
/hd0/23: fs=???, start=5888, length=256 (1 MiB)
/hd0/24: fs=???, start=6144, length=256 (1 MiB)
/> disk_del hd0

5
test/059_#gpt_all.t Normal file
View File

@@ -0,0 +1,5 @@
umka_init
disk_add ../img/gpt_partitions_s05k.img hd0 -c 0
disk_del hd0
disk_add ../img/gpt_partitions_s4k.img hd0 -c 0
disk_del hd0

View File

@@ -29,9 +29,10 @@ net_tests := $(addsuffix .out.log, $(basename $(wildcard *\#net_*.t)))
arp_tests := $(addsuffix .out.log, $(basename $(wildcard *\#arp_*.t)))
acpi_tests := $(addsuffix .out.log, $(basename $(wildcard *\#acpi_*.t)))
input_tests := $(addsuffix .out.log, $(basename $(wildcard *\#input_*.t)))
gpt_tests := $(addsuffix .out.log, $(basename $(wildcard *\#gpt_*.t)))
all: xfs exfat s05k s4k f30 f70 f70s0 f70s1 f70s5 lookup bug xattr unicode v5 \
draw coverage i40 net arp acpi input
draw coverage i40 net arp acpi input gpt
@echo all tests passed
xfs: $(xfs_tests)
@@ -55,6 +56,7 @@ net: $(net_tests)
arp: $(arp_tests)
acpi: $(acpi_tests)
input: $(input_tests)
gpt: $(gpt_tests)
%.out.log: %.t
$(UMKA_SHELL) -ri $*.t -o $@