From 4455085eb0f49ff8703835d8a4623907d8aea0b1 Mon Sep 17 00:00:00 2001 From: hja Date: Tue, 17 Nov 2026 20:14:00 +0000 Subject: [PATCH] darwin: print file type instead of fileport handle in error message In process_fileports(), the default case for unknown file types was printing fpi->proc_fileport (the fileport handle) instead of fpi->proc_fdtype (the actual file type enum). This produced misleading output like "unknown file type: 4660" instead of the enum value. Fixes a minor inconsistency with the parallel process_fds() function, which correctly prints fdp->proc_fdtype. --- lib/dialects/darwin/dproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dialects/darwin/dproc.c b/lib/dialects/darwin/dproc.c index e3b37925..0a7bb4f1 100644 --- a/lib/dialects/darwin/dproc.c +++ b/lib/dialects/darwin/dproc.c @@ -621,7 +621,7 @@ static void process_fileports(struct lsof_context *ctx, /* context */ break; default: (void)snpf(Namech, Namechl - 1, "unknown file type: %d", - fpi->proc_fileport); + fpi->proc_fdtype); Namech[Namechl - 1] = '\0'; (void)enter_nm(ctx, Namech); break;