scripts: Fixed issue where rbyd lookups rejected shrub tags

This was caused by including the shrub bit in the tag comparison in
Rbyd.lookup.

Fixed by adding an extra key mask (0xfff). Note this is already how
lfsr_rbyd_lookup works in lfs.c.
This commit is contained in:
Christopher Haster
2025-04-19 13:05:51 -05:00
parent fc095af472
commit a73f221317
6 changed files with 24 additions and 12 deletions

View File

@@ -805,7 +805,8 @@ class Rbyd:
rid_, rattr_ = r
if (rid_ is None
or rid_ != rid
or (rattr_.tag & ~mask) != (tag & ~mask)):
or (rattr_.tag & ~mask & 0xfff)
!= (tag & ~mask & 0xfff)):
if path:
return None, path_
else:
@@ -873,7 +874,8 @@ class Rbyd:
# found end of tree?
if (rid_ is None
or rid_ != rid
or (rattr_.tag & ~mask) != (tag & ~mask)):
or (rattr_.tag & ~mask & 0xfff)
!= (tag & ~mask & 0xfff)):
break
if path: