From bfc108c1dcaa274b4174593f695f5c8e377f7be5 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Wed, 3 Jul 2024 17:06:04 -0500 Subject: [PATCH] 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%) --- lfs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lfs.h b/lfs.h index e9613431..3d7311ab 100644 --- a/lfs.h +++ b/lfs.h @@ -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