Lines Matching refs:format
198 return 'avbtool {}.{}.{}'.format(AVB_VERSION_MAJOR,
384 raise AvbError('Error getting public key: {}'.format(perr))
448 .format(algorithm_name))
453 .format(self.num_bits, algorithm.signature_num_bytes * 8,
491 raise AvbError('Error signing: {}'.format(perr))
514 raise AvbError('Unknown algorithm type {}'.format(alg_type))
533 raise AvbError('Unsupported algorithm type {}'.format(alg_type))
615 'e=INTEGER:{}\n').format(hex(modulus).rstrip('L'),
639 raise AvbError('Error verifying data: {}'.format(perr))
791 'only 1.0 is supported'.format(major_version,
795 format(file_hdr_sz))
798 format(chunk_hdr_sz))
822 format(data_sz, chunk_sz*self.block_size))
834 'has {}'.format(data_sz))
845 format(data_sz))
855 'this has {}'.format(data_sz))
858 raise ValueError('Unknown chunk type {}'.format(chunk_type))
869 'but we saw {}'.format(self._num_total_blocks, offset))
873 'file.'.format(junk_len))
1017 raise RuntimeError('Seeking with negative offset: {}'.format(offset))
1193 o.write(' Tag: {}\n'.format(self.tag))
1195 o.write(' Data: {} ({} bytes)\n'.format(
1198 o.write(' Data: {} bytes\n'.format(len(self.data)))
1278 .format(e)) from e
1299 o.write(' Prop: {} -> {}\n'.format(self.key, printable_value))
1301 o.write(' Prop: {} -> ({} bytes)\n'.format(self.key, len(self.value)))
1418 .format(e)) from e
1454 o.write(' Version of dm-verity: {}\n'.format(self.dm_verity_version))
1455 o.write(' Image Size: {} bytes\n'.format(self.image_size))
1456 o.write(' Tree Offset: {}\n'.format(self.tree_offset))
1457 o.write(' Tree Size: {} bytes\n'.format(self.tree_size))
1458 o.write(' Data Block Size: {} bytes\n'.format(
1460 o.write(' Hash Block Size: {} bytes\n'.format(
1462 o.write(' FEC num roots: {}\n'.format(self.fec_num_roots))
1463 o.write(' FEC offset: {}\n'.format(self.fec_offset))
1464 o.write(' FEC size: {} bytes\n'.format(self.fec_size))
1465 o.write(' Hash Algorithm: {}\n'.format(self.hash_algorithm))
1466 o.write(' Partition Name: {}\n'.format(self.partition_name))
1467 o.write(' Salt: {}\n'.format(self.salt.hex()))
1468 o.write(' Root Digest: {}\n'.format(self.root_digest.hex()))
1469 o.write(' Flags: {}\n'.format(self.flags))
1530 format(image_filename))
1539 .format(self.partition_name))
1543 format(image_filename))
1546 .format(self.partition_name, self.hash_algorithm, image.filename,
1611 .format(e)) from e
1635 o.write(' Image Size: {} bytes\n'.format(self.image_size))
1636 o.write(' Hash Algorithm: {}\n'.format(self.hash_algorithm))
1637 o.write(' Partition Name: {}\n'.format(self.partition_name))
1638 o.write(' Salt: {}\n'.format(self.salt.hex()))
1639 o.write(' Digest: {}\n'.format(self.digest.hex()))
1640 o.write(' Flags: {}\n'.format(self.flags))
1692 format(self.hash_algorithm, image_filename))
1695 .format(self.partition_name, self.hash_algorithm, image.filename,
1745 .format(e)) from e
1757 o.write(' Flags: {}\n'.format(self.flags))
1758 o.write(' Kernel Cmdline: \'{}\'\n'.format(self.kernel_cmdline))
1843 .format(e)) from e
1859 o.write(' Partition Name: {}\n'.format(self.partition_name))
1860 o.write(' Rollback Index Location: {}\n'.format(
1864 o.write(' Public key (sha1): {}\n'.format(pubkey_digest))
1905 format(self.partition_name))
1912 format(rollback_index_location,
1920 format(self.partition_name))
1924 'expected data'.format(self.partition_name))
2339 'block size {}.'.format(partition_size,
2355 .format(partition_size,
2387 raise AvbError('Malformed slot data "{}".'.format(slot_data))
2426 o.write('Footer version: {}.{}\n'.format(footer.version_major,
2428 o.write('Image size: {} bytes\n'.format(image_size))
2429 o.write('Original image size: {} bytes\n'.format(
2431 o.write('VBMeta offset: {}\n'.format(footer.vbmeta_offset))
2432 o.write('VBMeta size: {} bytes\n'.format(footer.vbmeta_size))
2437 o.write('Minimum libavb version: {}.{}{}\n'.format(
2441 o.write('Header Block: {} bytes\n'.format(AvbVBMetaHeader.SIZE))
2442 o.write('Authentication Block: {} bytes\n'.format(
2444 o.write('Auxiliary Block: {} bytes\n'.format(
2448 o.write('Public key (sha1): {}\n'.format(hexdig))
2449 o.write('Algorithm: {}\n'.format(alg_name))
2450 o.write('Rollback Index: {}\n'.format(header.rollback_index))
2451 o.write('Flags: {}\n'.format(header.flags))
2452 o.write('Rollback Index Location: {}\n'.format(
2454 o.write('Release String: \'{}\'\n'.format(header.release_string))
2473 o.write(' Metadata version: {}\n'.format(version))
2478 o.write(' Version: {}\n'.format(version))
2479 o.write(' Public key (sha1): {}\n'.format(
2481 o.write(' Subject: {}\n'.format(subject.hex()))
2482 o.write(' Usage: {}\n'.format(usage.hex()))
2483 o.write(' Key version: {}\n'.format(key_version))
2513 raise AvbError('Malformed chained partition "{}".'.format(cp))
2527 print('Verifying image {} using key at {}'.format(image_filename,
2531 print('Verifying image {} using embedded public key'.format(
2548 .format(alg_name, image_filename))
2562 .format(alg_name, image.filename))
2565 .format(alg_name, image.filename))
2576 .format(desc.partition_name, desc.rollback_index_location,
2637 output.write('{}: {}\n'.format(desc.partition_name, digest))
2644 output.write('{}: {}\n'.format(desc.partition_name, digest))
2693 output.write('{}\n'.format(digest.hex()))
2828 c += ' {}'.format((ht.image_size // 512)) # size (# sectors)
2829 c += ' verity {}'.format(ht.dm_verity_version) # type and version
2832 c += ' {}'.format(ht.data_block_size) # data_block
2833 c += ' {}'.format(ht.hash_block_size) # hash_block
2834 c += ' {}'.format(ht.image_size // ht.data_block_size) # #blocks
2835 c += ' {}'.format(ht.image_size // ht.data_block_size) # hash_offset
2836 c += ' {}'.format(ht.hash_algorithm) # hash_alg
2837 c += ' {}'.format(ht.root_digest.hex()) # root_digest
2838 c += ' {}'.format(ht.salt.hex()) # salt
2848 c += ' fec_roots {}'.format(ht.fec_num_roots)
2852 c += ' fec_blocks {}'.format(ht.fec_offset // ht.data_block_size)
2853 c += ' fec_start {}'.format(ht.fec_offset // ht.data_block_size)
2959 print('1.{}'.format(tmp_header.required_libavb_version_minor))
3043 .format(algorithm_name)) from e
3057 raise AvbError('Malformed chained partition "{}".'.format(cp))
3064 raise AvbError('Rollback Index Location {} is already in use.'.format(
3086 raise AvbError('Malformed property "{}".'.format(prop))
3096 raise AvbError('Malformed property "{}".'.format(prop))
3161 raise AvbError('Key is required for algorithm {}'.format(
3165 raise AvbError('Key is wrong size for algorithm {}'.format(
3266 'block size {}.'.format(partition_size,
3330 raise AvbError('Appending VBMeta image failed: {}.'.format(e)) from e
3401 print('1.{}'.format(required_libavb_version_minor))
3410 'Needs to be at least {}'.format(
3415 print('{}'.format(partition_size - max_metadata_size))
3443 'block size {}.'.format(partition_size,
3453 'size of {}.'.format(image.image_size, max_image_size,
3545 raise AvbError('Adding hash_footer failed: {}.'.format(e)) from e
3622 print('1.{}'.format(required_libavb_version_minor))
3650 print('{}'.format(max_image_size))
3658 'block size {}.'.format(partition_size,
3662 'block size {}.'.format(image.image_size,
3694 'size of {}.'.format(image.image_size, max_image_size,
3823 raise AvbError('Adding hashtree_footer failed: {}.'.format(e)) from e
4051 raise ValueError('Error invoking fec: {}'.format(perr))
4076 .format(e)) from e
4737 sys.stderr.write('{}: {}\n'.format(argv[0], str(e)))