File Only-warn-about-missing-proc-pid-fd-in-bughunt-mode-.patch of Package nethogs.30669

From 57fabda44025f43f36fa03cb1e60884e4d1405d9 Mon Sep 17 00:00:00 2001
From: Arnout Engelen <arnouten@bzzt.net>
Date: Wed, 6 Jan 2016 17:58:44 +0100
Subject: [PATCH] Only warn about missing /proc/<pid>/fd in bughunt-mode (fixes
 #15)

---
 inode2prog.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/inode2prog.cpp b/inode2prog.cpp
index cfac566..e70c3d3 100644
--- a/inode2prog.cpp
+++ b/inode2prog.cpp
@@ -155,7 +155,10 @@ void get_info_for_pid(const char * pid) {
 
 	if (!dir)
 	{
-		std::cout << "Couldn't open dir " << dirname << ": " << strerror(errno) << "\n";
+		if (bughuntmode)
+		{
+			std::cout << "Couldn't open dir " << dirname << ": " << strerror(errno) << "\n";
+		}
 		return;
 	}
 
-- 
2.41.0

openSUSE Build Service is sponsored by