mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Added path iteration and chained directories
All path iteration all goes through the lfs_dir_find function, which manages the syntax of paths and updates the path pointer to just the name stored in the dir entry. Also added directory chaining, which allows more than one block per directory. This is a simple linked list.
This commit is contained in:
		| @@ -10,9 +10,8 @@ def generate(test): | ||||
|         template = file.read() | ||||
|  | ||||
|     lines = [] | ||||
|  | ||||
|     for line in re.split('(?<=[;{}])\n', test.read()): | ||||
|         match = re.match('( *)(.*)=>(.*);', line, re.MULTILINE) | ||||
|         match = re.match('(?: *\n)*( *)(.*)=>(.*);', line, re.MULTILINE) | ||||
|         if match: | ||||
|             tab, test, expect = match.groups() | ||||
|             lines.append(tab+'res = {test};'.format(test=test.strip())) | ||||
| @@ -33,13 +32,17 @@ def execute(): | ||||
|     subprocess.check_call(["./lfs"]) | ||||
|  | ||||
| def main(test=None): | ||||
|     if test: | ||||
|     if test and not test.startswith('-'): | ||||
|         with open(test) as file: | ||||
|             generate(file) | ||||
|     else: | ||||
|         generate(sys.stdin) | ||||
|  | ||||
|     compile() | ||||
|  | ||||
|     if test == '-s': | ||||
|         sys.exit(1) | ||||
|  | ||||
|     execute() | ||||
|  | ||||
| if __name__ == "__main__": | ||||
|   | ||||
		Reference in New Issue
	
	Block a user