Is anyone interested in reviewing this?

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/bwm-ng/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile    17 Jan 2016 22:51:33 -0000      1.12
+++ Makefile    12 Aug 2017 12:49:10 -0000
@@ -3,6 +3,7 @@
 COMMENT=               realtime bandwidth monitoring of interfaces
 
 DISTNAME=              bwm-ng-0.6.1
+REVISION=              0
 CATEGORIES=            net
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=bwmng/}
 HOMEPAGE=              http://www.gropp.org/
@@ -12,6 +13,7 @@ MAINTAINER=           Stuart Henderson <sthen@ope
 # GPLv2+
 PERMIT_PACKAGE_CDROM=   Yes
 
+# uses pledge()
 WANTLIB=               c curses
 
 CONFIGURE_STYLE=       gnu
Index: patches/patch-src_bwm-ng_c
===================================================================
RCS file: patches/patch-src_bwm-ng_c
diff -N patches/patch-src_bwm-ng_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_bwm-ng_c  12 Aug 2017 12:49:10 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+unix:  performs ioctl on interfaces to check if they're up (press "a" three 
times)
+route: retrieves interface stats via sysctl
+
+Index: src/bwm-ng.c
+--- src/bwm-ng.c.orig
++++ src/bwm-ng.c
+@@ -211,6 +211,13 @@ int main (int argc, char *argv[]) {
+       /* end of init curses, now set a sigint handler to deinit the screen on 
ctrl-break */
+       signal(SIGINT,sigint);
+       signal(SIGTERM,sigint);
++      if (out_file_path) {
++              if (pledge("stdio unix cpath wpath route tty", NULL) == -1)
++                      deinit(1, "pledge\n");
++      } else {
++              if (pledge("stdio unix route tty", NULL) == -1)
++                      deinit(1, "pledge\n");
++      }
+ #ifdef CSV    
+     /* get stats without verbose if cvs */
+       if (output_method==CSV_OUT && output_count>-1) {

Reply via email to