#!/usr/bin/python
# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# Note: the no-value-for-parameter here is expected, as the click module
+# decorators modify function arguments which pylint doesn't know
+# pylint: disable=no-value-for-parameter
"""
A program to parse auxv (e.g. /proc/self/auxv).
width = {32:'II', 64:'QQ'}[field_width]
- format = f'{endian}{width}'
- print(f'# {format=}')
+ format_str = f'{endian}{width}'
+ print(f'# {format_str=}')
seen_null = False
- for item in struct.iter_unpack(format, data):
+ for item in struct.iter_unpack(format_str, data):
key, val = item
name = AT_AUXV_NAMES.get(key, f'unknown ({key})')
if name.endswith(('UID', 'GID')):
pref, fmt = '0x', 'x'
if seen_null:
- print('# trailing garbarbage after AT_NULL')
+ print('# trailing garbage after AT_NULL')
print(f'{name:18} = {pref}{val:{fmt}}')