Commit cd7dd37
committed
scripts: dbglfs3.py: Adopted % as littlefs root dir character
The idea is this is similar to ~ for the home directory, hopefully
simplifying littlefs path parsing in scripts:
- /hi -> hi in root dir
- ./hi -> hi in current dir
- ../hi -> hi in parent dir
- ~/hi -> hi in home dir
- %/hi -> hi in littlefs root dir
Note this only works when standalone:
- ~hi != ~/hi
- %hi != %/hi
And files named % can still be referenced with a ./ prefix:
- ./% -> % in current dir
- %/% -> % in littlefs root dir
---
This is probably overkill for dbglfs3.py, as the arg ordering was
already enough to disambiguate disk path vs mroot address vs littlefs
path, but eventually I think the idea will be useful for more powerful
scripts.
A hypothetical:
$ mklfs3 cp disk -b4096 -r image_files %/image_files1 parent 0d5cdea commit cd7dd37
1 file changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4422 | 4422 | | |
4423 | 4423 | | |
4424 | 4424 | | |
4425 | | - | |
| 4425 | + | |
4426 | 4426 | | |
| 4427 | + | |
| 4428 | + | |
| 4429 | + | |
| 4430 | + | |
| 4431 | + | |
| 4432 | + | |
4427 | 4433 | | |
4428 | 4434 | | |
4429 | 4435 | | |
| |||
4952 | 4958 | | |
4953 | 4959 | | |
4954 | 4960 | | |
4955 | | - | |
| 4961 | + | |
4956 | 4962 | | |
4957 | 4963 | | |
4958 | 4964 | | |
4959 | 4965 | | |
4960 | 4966 | | |
4961 | | - | |
| 4967 | + | |
4962 | 4968 | | |
4963 | | - | |
4964 | | - | |
| 4969 | + | |
| 4970 | + | |
| 4971 | + | |
4965 | 4972 | | |
4966 | 4973 | | |
4967 | 4974 | | |
| |||
0 commit comments