WIP dropped lfs_fs_getattr for more implicit lfs_getattr("/")

This commit is contained in:
Christopher Haster
2018-08-11 23:05:52 -05:00
parent 533b3bf686
commit 4264b28aa3
4 changed files with 107 additions and 131 deletions

View File

@@ -7,7 +7,7 @@ TYPES = {
(0x1ff, 0x001): 'reg',
(0x1ff, 0x002): 'dir',
(0x1ff, 0x011): 'superblock',
(0x1ff, 0x012): 'root',
(0x1ff, 0x010): 'root',
(0x1ff, 0x030): 'delete',
(0x1f0, 0x080): 'globals',
(0x1ff, 0x0c0): 'tail soft',
@@ -50,9 +50,13 @@ def main(*blocks):
crc = ncrc
versions.append((nrev, '%s (rev %d)' % (block, nrev)))
except IOError:
except (IOError, struct.error):
pass
if not file:
print 'Bad metadata pair {%s}' % ', '.join(blocks)
return 1
print "--- %s ---" % ', '.join(v for _,v in sorted(versions, reverse=True))
# go through each tag, print useful information
@@ -93,6 +97,8 @@ def main(*blocks):
if type == 0x0f0:
crc = 0
return 0
if __name__ == "__main__":
import sys
main(*sys.argv[1:])
sys.exit(main(*sys.argv[1:]))