diff options
author | Adam Weinberger <adamw@FreeBSD.org> | 2021-08-04 05:42:31 -0600 |
---|---|---|
committer | Adam Weinberger <adamw@FreeBSD.org> | 2021-08-04 05:42:43 -0600 |
commit | bf413125edadefba0a2bddcc5f3f5dd521f22537 (patch) | |
tree | af03527f5f6552ced2d47027eee6b7ad47a221c9 /sysutils/tmux-mem-cpu-load/files | |
parent | ftp/vsftpd: remove obsolte patch (diff) |
sysutils/tmux-mem-cpu-load: Update to 3.5.0
Diffstat (limited to 'sysutils/tmux-mem-cpu-load/files')
-rw-r--r-- | sysutils/tmux-mem-cpu-load/files/patch-common_cpu.h | 11 | ||||
-rw-r--r-- | sysutils/tmux-mem-cpu-load/files/patch-freebsd_memory.cc | 24 |
2 files changed, 11 insertions, 24 deletions
diff --git a/sysutils/tmux-mem-cpu-load/files/patch-common_cpu.h b/sysutils/tmux-mem-cpu-load/files/patch-common_cpu.h new file mode 100644 index 000000000000..42237a044b95 --- /dev/null +++ b/sysutils/tmux-mem-cpu-load/files/patch-common_cpu.h @@ -0,0 +1,11 @@ +--- common/cpu.h.orig 2021-08-04 11:37:18 UTC ++++ common/cpu.h +@@ -45,7 +45,7 @@ + #endif + + float cpu_percentage( unsigned ); +-uint32_t get_cpu_count(); ++uint8_t get_cpu_count(); + + /** CPU percentage output mode. + * diff --git a/sysutils/tmux-mem-cpu-load/files/patch-freebsd_memory.cc b/sysutils/tmux-mem-cpu-load/files/patch-freebsd_memory.cc deleted file mode 100644 index d6c2344c9274..000000000000 --- a/sysutils/tmux-mem-cpu-load/files/patch-freebsd_memory.cc +++ /dev/null @@ -1,24 +0,0 @@ -From e24890652e3674fe4677722aab8644e62da37348 Mon Sep 17 00:00:00 2001 -From: Dima Panov <fluffy@FreeBSD.org> -Date: Fri, 20 Dec 2019 02:47:32 +1000 -Subject: [PATCH] Fix calculate memory usage on FreeBSD - ---- - freebsd/memory.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/freebsd/memory.cc b/freebsd/memory.cc -index 5500032..687a0a8 100644 ---- freebsd/memory.cc -+++ freebsd/memory.cc -@@ -63,8 +63,8 @@ void mem_status( MemoryStatus & status ) - //u_int unused = ( cache + inactive + free ) * page_size; - - // Used memory on FreeBSD is active + wired. -- u_int used = ( active + wired ) * page_size; -+ u_int used = ( active + wired ); - -- status.used_mem = convert_unit( static_cast< float >( used ), MEGABYTES ); -+ status.used_mem = convert_unit( static_cast< float >( used * (page_size >> 10) ), MEGABYTES, KILOBYTES ); - status.total_mem = convert_unit( static_cast< float >( page_count * (page_size >> 10) ), MEGABYTES, KILOBYTES); - } |