openbsd-ports/net/bwm-ng/patches/patch-src_bwm-ng_c
op 7b52795ca5 update net/bwm-ng to 0.6.3
0.6.2 and 0.6.3 are mostly bugfixes: https://www.gropp.org/bwm-ng/changelog

ok solene@
2022-08-17 09:18:28 +00:00

21 lines
697 B
Plaintext

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
@@ -210,6 +210,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) {