Switch esc_tag and path formatting to a contiguous thread-local circular pool to eliminate stack bloat
Some checks failed
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL Advanced / Analyze (c-cpp) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled

This commit is contained in:
Andrea Mazzoleni 2026-05-29 11:01:44 +02:00
parent aee71ad2d6
commit 96e20b3912
21 changed files with 283 additions and 260 deletions

View file

@ -3225,13 +3225,11 @@ int devmap(void)
h = CreateFileW(convert(conv_buf, wfile), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH, 0);
if (h == INVALID_HANDLE_VALUE)
continue;
char esc_buffer[ESC_MAX];
char serial[SMART_MAX];
serial[0] = 0;
devattr_property(h, serial, 0, 0);
if (serial[0]) {
log_tag("map:/dev/pd%d:%s\n", i, esc_tag(serial, esc_buffer));
log_tag("map:/dev/pd%d:%s\n", i, esc_tag(serial));
}
CloseHandle(h);