Commit 601e85f
Fix truncated fd numbers in -F field output
When fd numbers >= 10000, fd_to_string() truncates them to fit the
fixed-width FDLEN buffer (e.g., 12345 becomes *345). This truncation
is appropriate for the tabular display but incorrect for -F (field)
output which is designed for machine parsing.
In the -F output path, print numeric fd values directly using
printf("%d") instead of going through fd_to_string(), avoiding
the FDLEN buffer size constraint.
Fixes #311
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 761ca77 commit 601e85f
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1110 | 1110 | | |
1111 | 1111 | | |
1112 | 1112 | | |
1113 | | - | |
| 1113 | + | |
1114 | 1114 | | |
1115 | 1115 | | |
1116 | 1116 | | |
| |||
1892 | 1892 | | |
1893 | 1893 | | |
1894 | 1894 | | |
1895 | | - | |
1896 | | - | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
1897 | 1901 | | |
1898 | 1902 | | |
1899 | 1903 | | |
| |||
0 commit comments