Changed CKSUM suptype encoding from 0x2000 -> 0x3000

I may be overthinking things, but I'm guessing of all the possible tag
modes we may want to add in the future, we will mostly like want to add
something that looks vaguely tag like. Like the shrub tags, for example.

It's beneficial, ordering wise, for these hypothetical future tags to
come before the cksum tags.

Current tag modes:

  0x0ttt  v--- tttt -ttt tttt  normal tags
  0x1ttt  v--1 tttt -ttt tttt  shrub tags
  0x3tpp  v-11 tttt ---- ---p  cksum tags
  0x4kkk  v1dc kkkk -kkk kkkk  alt tags
This commit is contained in:
Christopher Haster
2023-10-24 23:46:11 -05:00
parent 1fc2f672a2
commit 240fe4efe4
5 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -636,8 +636,8 @@ enum lfsr_tag_type {
LFSR_TAG_R = 0x1000,
// checksum tags
LFSR_TAG_CKSUM = 0x2000,
LFSR_TAG_ECKSUM = 0x2100,
LFSR_TAG_CKSUM = 0x3000,
LFSR_TAG_ECKSUM = 0x3100,
// in-device only tags, these should never get written to disk
LFSR_TAG_INTERNAL = 0x0800,
@@ -723,7 +723,7 @@ static inline bool lfsr_tag_isshrub(lfsr_tag_t tag) {
}
static inline bool lfsr_tag_istrunk(lfsr_tag_t tag) {
return (tag & 0xe000) != 0x2000;
return lfsr_tag_mode(tag) != LFSR_TAG_CKSUM;
}
static inline bool lfsr_tag_isinternal(lfsr_tag_t tag) {