MCPcopy Create free account
hub / github.com/coreboot/coreboot / main

Function main

util/exynos/variable_cksum.py:20–32  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

18import sys
19
20def main(argv):
21 if len(argv) != 3:
22 exit('usage: %s IN OUT' % argv[0])
23
24 in_name, out_name = argv[1:3]
25 header_format = "<IIII"
26 with open(in_name, "rb") as in_file, open(out_name, "wb") as out_file:
27 data = in_file.read()
28 header = struct.pack(header_format,
29 struct.calcsize(header_format) + len(data),
30 sum(data),
31 0, 0)
32 out_file.write(header + data)
33
34
35if __name__ == '__main__':

Callers 1

variable_cksum.pyFile · 0.70

Calls 2

exitFunction · 0.85
readMethod · 0.80

Tested by

no test coverage detected