From c3c010178654810fb324471328d47cda34622b67 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sun, 5 Jan 2025 14:59:48 -0800 Subject: [PATCH] Cosmetic changes to the code - Fix output of filesystems in mounter.c debugging - Fix comment about jumper settings in attach.c --- attach.c | 2 +- mounter.c | 28 ++++++++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/attach.c b/attach.c index 437a80a..778d353 100644 --- a/attach.c +++ b/attach.c @@ -407,7 +407,7 @@ init_chan(device_t self, UBYTE *boardnum) * SW 8 Off SCSI LUNs Enabled chan->chan_nluns * SW 7 Off Internal Termination On Handled by hardware * SW 6 Off Synchronous SCSI Mode sc->sc_nosync - * SW 5 Off Short Spinup NOT SUPPORTED YET + * SW 5 Off Short Spinup ms.slowSpinup * SW 4 Off SCSI-2 Fast Bus Mode NOT SUPPORTED YET * SW 3 Off ADR2=1 chan->chan_id * SW 2 Off ADR1=1 chan->chan_id diff --git a/mounter.c b/mounter.c index c410ec7..a0b6141 100644 --- a/mounter.c +++ b/mounter.c @@ -954,8 +954,8 @@ static void list_filesystems(void) return; } - printf("DosType Version Creator\n"); - printf("---------------------------------------------------\n"); + printf("DosType Version Creator\n"); + printf("---------------------------------------------------------------------------\n"); for (fse = (struct FileSysEntry *)FileSysResBase->fsr_FileSysEntries.lh_Head; fse->fse_Node.ln_Succ; fse = (struct FileSysEntry *)fse->fse_Node.ln_Succ) { @@ -966,14 +966,22 @@ static void list_filesystems(void) putchar((fse->fse_DosType & 0xFF) < 0x30 ? (fse->fse_DosType & 0xFF) + 0x30 : (fse->fse_DosType & 0xFF)); - printf(" %s%d", (fse->fse_Version >> 16)<10 ? " " : "", - (fse->fse_Version >> 16)); - printf(".%d%s", (fse->fse_Version & 0xFFFF), - (fse->fse_Version & 0xFFFF)<10 ? " " : ""); - if(fse->fse_Node.ln_Name[0]) - printf(" %s",fse->fse_Node.ln_Name); - else - printf(" N/A\n"); + printf(" %3d.%-3d", (fse->fse_Version >> 16), (fse->fse_Version & 0xFFFF)); + if(fse->fse_Node.ln_Name[0]) { + char term; + int name_len = strlen(fse->fse_Node.ln_Name); + + printf(" %.55s", fse->fse_Node.ln_Name); + if (name_len >= 55) { + printf("..."); + name_len = 55; + } + term = fse->fse_Node.ln_Name[name_len-1]; + if (term != 10 && term != 13) + printf("\n"); + } else { + printf(" N/A\n"); + } } #endif }