mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-12-26 09:08:30 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user