diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-05-14 21:32:06 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-05-14 21:51:47 -0700 |
commit | 56c9248109e0bd56d4e7913bef78231ab8112c85 (patch) | |
tree | df6450502eaf8801e85d734a579bd1d227a8173e /translate_subx_emulated | |
parent | 7205c2465fbefb067bfaf169f2a9c81f1feed0ae (diff) | |
download | mu-56c9248109e0bd56d4e7913bef78231ab8112c85.tar.gz |
load debug info from disk on abort
Diffstat (limited to 'translate_subx_emulated')
-rwxr-xr-x | translate_subx_emulated | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/translate_subx_emulated b/translate_subx_emulated index aef29801..439befcd 100755 --- a/translate_subx_emulated +++ b/translate_subx_emulated @@ -46,9 +46,15 @@ then fi # Latter half of disk is for debug info. -dd if=labels of=code.img seek=10080 conv=notrunc +dd if=labels of=code.img seek=10080 conv=notrunc # keep this sync'd with abort.subx if [ `stat --printf="%s" labels` -ge 131072 ] # 256 sectors * 512 bytes per sector, the most an ATA drive can read in a single command then echo "labels won't all be loaded on abort" exit 1 fi + +if [ `wc -l < labels` -gt 4096 ] # 0x1000 stream capacity in abort.subx +then + echo "abort will go into infinite regress" + exit 1 +fi |