diff options
| author | David Laight <david.laight.linux@gmail.com> | 2026-06-24 15:52:42 +0100 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-07-16 16:00:41 +0200 |
| commit | 96979634af39a3f176f3c213fdaee274e869057c (patch) | |
| tree | 4d273d1af14843953049c0b87294a56c064efd7d /tools/perf/scripts/python/flamegraph.py | |
| parent | 78726ba0ffe3aa16848e86c4571ab647ff7b1b4e (diff) | |
dm: list_devices(): Only process devices once
Instead of doing a prescan to determine the length of buffer required,
checking the supplied buffer is big enough, and then doing a second
scan to fill the output buffer just do a single scan and detect when
the buffer is too short.
For additional safety only call strlen() once and use the
returned length for everything (incuding the copy).
Ensure than all the pad bytes between the entries are zero.
Signed-off-by: David Laight <david.laight.linux@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
