Commit e289cf73 by devttys0

Fixed int conversion bug; added missing file-size keyword to big endian squashfs signature.

parent ecdb93cb
......@@ -47,7 +47,11 @@ class Option(object):
def convert(self, value):
if self.type and (self.type.__name__ == self.dtype):
return self.type(value)
# Be sure to specify a base of 0 for int() so that the base is auto-detected
if self.type == int:
return self.type(value, 0)
else:
return self.type(value)
else:
return value
......
......@@ -1263,10 +1263,16 @@
>>20 beshort >4 \binvalid,
>28 beshort <3
>>8 belong x size: %d bytes,
>>8 belong x \b{jump-to-offset:%d}
>>8 belong x \b{file-size:%d}
>28 beshort 3
>>63 bequad x size: %lld bytes,
>>63 bequad x \b{jump-to-offset:%lld}
>>63 bequad x \b{file-size:%lld}
>28 beshort >3
>>40 bequad x size: %lld bytes,
>>40 bequad x \b{jump-to-offset:%lld}
>>40 bequad x \b{file-size:%lld}
>4 belong x %d inodes,
>28 beshort >3
>>12 belong blocksize: %d bytes,
......@@ -1282,12 +1288,6 @@
>>39 bedate x created: %s
>28 beshort >3
>>8 bedate x created: %s
>28 beshort <3
>>8 belong x {jump-to-offset:%d}
>28 beshort 3
>>63 bequad x {jump-to-offset:%lld}
>28 beshort >3
>>40 bequad x {jump-to-offset:%lld}
# Squashfs, little endian
0 string hsqs Squashfs filesystem, little endian,
......
......@@ -156,10 +156,16 @@
>>20 beshort >4 \binvalid,
>28 beshort <3
>>8 belong x size: %d bytes,
>>8 belong x \b{jump-to-offset:%d}
>>8 belong x \b{file-size:%d}
>28 beshort 3
>>63 bequad x size: %lld bytes,
>>63 bequad x \b{jump-to-offset:%lld}
>>63 bequad x \b{file-size:%lld}
>28 beshort >3
>>40 bequad x size: %lld bytes,
>>40 bequad x \b{jump-to-offset:%lld}
>>40 bequad x \b{file-size:%lld}
>4 belong x %d inodes,
>28 beshort >3
>>12 belong blocksize: %d bytes,
......@@ -175,12 +181,6 @@
>>39 bedate x created: %s
>28 beshort >3
>>8 bedate x created: %s
>28 beshort <3
>>8 belong x {jump-to-offset:%d}
>28 beshort 3
>>63 bequad x {jump-to-offset:%lld}
>28 beshort >3
>>40 bequad x {jump-to-offset:%lld}
# Squashfs, little endian
0 string hsqs Squashfs filesystem, little endian,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment