mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Added deletion to custom attributes
This follows from enabling tag deletion, however does require some consideration with the APIs. Now we can remove custom attributes, as well as determine if an attribute exists or not.
This commit is contained in:
		| @@ -19,10 +19,11 @@ def corrupt(block): | ||||
|                 break | ||||
|  | ||||
|             tag ^= ntag | ||||
|             file.seek(tag & 0xfff, os.SEEK_CUR) | ||||
|             size = (tag & 0xfff) if (tag & 0xfff) != 0xfff else 0 | ||||
|             file.seek(size, os.SEEK_CUR) | ||||
|  | ||||
|         # lob off last 3 bytes | ||||
|         file.seek(-((tag & 0xfff) + 3), os.SEEK_CUR) | ||||
|         file.seek(-(size + 3), os.SEEK_CUR) | ||||
|         file.truncate() | ||||
|  | ||||
| def main(args): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user