We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 761ca77 + 601e85f commit 4308799Copy full SHA for 4308799
1 file changed
src/print.c
@@ -1110,7 +1110,7 @@ static int printinaddr(struct lsof_context *ctx) {
1110
*/
1111
if (nl < 2)
1112
1113
- addr_too_long :
+ addr_too_long:
1114
1115
{
1116
(void)snpf(Namech, Namechl, "network addresses too long");
@@ -1892,8 +1892,12 @@ int print_proc(struct lsof_context *ctx) {
1892
lc = st = 0;
1893
if (FieldSel[LSOF_FIX_FD].st) {
1894
1895
- fd_to_string(Lf->fd_type, Lf->fd_num, fd);
1896
- (void)printf("%c%s%c", LSOF_FID_FD, fd, Terminator);
+ if (Lf->fd_type == LSOF_FD_NUMERIC)
+ (void)printf("%c%d%c", LSOF_FID_FD, Lf->fd_num, Terminator);
1897
+ else {
1898
+ fd_to_string(Lf->fd_type, Lf->fd_num, fd);
1899
+ (void)printf("%c%s%c", LSOF_FID_FD, fd, Terminator);
1900
+ }
1901
lc++;
1902
}
1903
/*
0 commit comments