From a9adcd914b73f7cb0c3ade1a0c23c4596ac5a95d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 25 Mar 2025 01:21:11 +0900 Subject: [PATCH] fortify/parse: omit try fd fallthrough message This reduces noise in verbose output. Signed-off-by: Ophestra --- parse.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parse.go b/parse.go index 9577546..4281e32 100644 --- a/parse.go +++ b/parse.go @@ -50,9 +50,12 @@ func tryPath(name string) (config *fst.Config) { func tryFd(name string) io.ReadCloser { if v, err := strconv.Atoi(name); err != nil { - fmsg.Verbosef("name cannot be interpreted as int64: %v", err) + if !errors.Is(err, strconv.ErrSyntax) { + fmsg.Verbosef("name cannot be interpreted as int64: %v", err) + } return nil } else { + fmsg.Verbosef("trying config stream from %d", v) fd := uintptr(v) if _, _, errno := syscall.Syscall(syscall.SYS_FCNTL, fd, syscall.F_GETFD, 0); errno != 0 { if errors.Is(errno, syscall.EBADF) {