Tweaked LFS_TYPE_TRAVERSAL to not conflict with orphans

Just in case any tags leak through. If an orphan tag ended up in an
lfsr_stat call, it could be quite confusing to users...

Current types:

  // user facing
  LFS_TYPE_REG          1  ---1
  LFS_TYPE_DIR          2  --1-
  LFS_TYPE_SYMLINK*     3  --11

  // internal
  LFS_TYPE_BOOKMARK     4  -1-- -.
  LFS_TYPE_ORPHAN       5  -1-1  +- on-disk only
  LFS_TYPE_COMPR*       6  -11- -'
  LFS_TYPE_TRAVERSAL    9  1--1 <-- in-ram only

  * Hypothetical

This has no impact on code size:

           code          stack
  before: 35228           2688
  after:  35228 (+0.0%)   2688 (+0.0%)
This commit is contained in:
Christopher Haster
2024-07-03 17:06:04 -05:00
parent 181b08c723
commit bfc108c1dc
+2 -1
View File
@@ -122,7 +122,8 @@ enum lfs_type {
// internally used types
LFS_TYPE_BOOKMARK = 4,
LFS_TYPE_TRAVERSAL = 5,
LFS_TYPE_ORPHAN = 5,
LFS_TYPE_TRAVERSAL = 9,
};
// File open flags