commit db430c7a40e4a25805b8fc6ec4c30207f7f26591 from: Sven M. Hallberg date: Thu Jun 4 12:22:28 2026 UTC und64 -l: recognize locked bit in file type commit - 6158c30acc3e7b210819177b293a428f50d1ede8 commit + db430c7a40e4a25805b8fc6ec4c30207f7f26591 blob - 2c496a21b300c03b6f3de6c6ecc0e5b1895ca187 blob + c8ba7a999786774e7b150e4e07744eee6f11f0d9 --- und64.c +++ und64.c @@ -36,7 +36,8 @@ struct datablk { typedef enum { DEL, SEQ, PRG, USR, REL, NTYPE } ftype; struct direntry { - byte de_type:7; + byte de_type:6; + byte de_locked:1; /* 1 = blocked from being scratched */ byte de_closed:1; /* 1 = properly closed file */ blkaddr de_data; /* -> struct datablk */ uchar de_name[16]; /* padded with 0xA0 */ @@ -239,7 +240,7 @@ listdir(void) for (i = 0; i < 8; i++) { de = ((struct direntry *)db->db_data) + i; t = de->de_type; - if (!de->de_closed && t == DEL) + if (t == DEL && !de->de_closed && !de->de_locked) continue; printf("%-4d \"", fromw(de->de_nblocks)); @@ -256,6 +257,8 @@ listdir(void) printf("???"); else printf("%s", typename[t]); + if (de->de_locked) + putchar('<'); putchar('\n'); }