FreeBSD Bugzilla – Attachment 122453 Details for
Bug 165661
[MAINTAINER] sysutils/htop: update to 1.0.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
htop.diff
htop.diff (text/plain), 8.06 KB, created by
Hung-Yi Chen
on 2012-03-03 17:30:10 UTC
(
hide
)
Description:
htop.diff
Filename:
MIME Type:
Creator:
Hung-Yi Chen
Created:
2012-03-03 17:30:10 UTC
Size:
8.06 KB
patch
obsolete
>===> Generating patch >===> Viewing diff with more >diff -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/Makefile /usr/ports/sysutils/htop/Makefile >--- /usr/ports/sysutils/htop.orig/Makefile 2012-03-04 01:13:21.000000000 +0800 >+++ /usr/ports/sysutils/htop/Makefile 2012-03-04 01:13:40.000000000 +0800 >@@ -6,8 +6,7 @@ > # > > PORTNAME= htop >-PORTVERSION= 0.9 >-PORTREVISION= 1 >+PORTVERSION= 1.0.1 > CATEGORIES= sysutils > MASTER_SITES= SF > >diff -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/distinfo /usr/ports/sysutils/htop/distinfo >--- /usr/ports/sysutils/htop.orig/distinfo 2012-03-04 01:13:21.000000000 +0800 >+++ /usr/ports/sysutils/htop/distinfo 2012-03-04 01:14:32.000000000 +0800 >@@ -1,2 +1,2 @@ >-SHA256 (htop-0.9.tar.gz) = 4de65c38e1886bccd30ed692b30eb9bf195240680781bfe1eaf5faf84ee6fbfd >-SIZE (htop-0.9.tar.gz) = 418767 >+SHA256 (htop-1.0.1.tar.gz) = 07db2cbe02835f9e186b9610ecc3beca330a5c9beadb3b6069dd0a10561506f2 >+SIZE (htop-1.0.1.tar.gz) = 384683 >diff -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/files/patch-FunctionBar.c /usr/ports/sysutils/htop/files/patch-FunctionBar.c >--- /usr/ports/sysutils/htop.orig/files/patch-FunctionBar.c 2012-03-04 01:13:21.000000000 +0800 >+++ /usr/ports/sysutils/htop/files/patch-FunctionBar.c 1970-01-01 08:00:00.000000000 +0800 >@@ -1,19 +0,0 @@ >---- FunctionBar.c.orig 2010-01-26 03:50:57.000000000 +0800 >-+++ FunctionBar.c 2010-01-26 03:51:50.000000000 +0800 >-@@ -52,14 +52,12 @@ >- this->functions = malloc(sizeof(char*) * 15); >- this->keys = malloc(sizeof(char*) * 15); >- this->events = malloc(sizeof(int) * 15); >-- int i = 0; >-- while (i < 15 && functions[i]) { >-+ for (int i = 0; i < 15 && functions[i]; i++) { >- this->functions[i] = String_copy(functions[i]); >- this->keys[i] = String_copy(keys[i]); >- this->events[i] = events[i]; >-- i++; >-+ this->size = i; >- } >-- this->size = i; >- } else { >- this->staticData = true; >- this->functions = functions ? functions : FunctionBar_FLabels; >diff -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/files/patch-ProcessList.c /usr/ports/sysutils/htop/files/patch-ProcessList.c >--- /usr/ports/sysutils/htop.orig/files/patch-ProcessList.c 2012-03-04 01:13:21.000000000 +0800 >+++ /usr/ports/sysutils/htop/files/patch-ProcessList.c 1970-01-01 08:00:00.000000000 +0800 >@@ -1,87 +0,0 @@ >---- ./ProcessList.c.orig 2010-11-26 18:50:25.000000000 +0200 >-+++ ./ProcessList.c 2011-08-11 13:07:08.000000000 +0300 >-@@ -32,6 +32,19 @@ >- #include "debug.h" >- #include <assert.h> >- >-+#ifndef PAGE_SIZE >-+#define PAGE_SIZE sysconf(_SC_PAGESIZE) >-+#endif >-+ >-+#ifdef __FreeBSD__ >-+#define KB 1024 >-+#define SYSCTLBYNAME(name, var, len) sysctlbyname(name, &(var), &(len), NULL, 0) >-+#include <kvm.h> >-+#include <paths.h> >-+#include <fcntl.h> >-+#include <sys/sysctl.h> >-+#endif >-+ >- /*{ >- >- #ifndef PROCDIR >-@@ -665,15 +678,24 @@ >- >- void ProcessList_scan(ProcessList* this) { >- unsigned long long int usertime, nicetime, systemtime, systemalltime, idlealltime, idletime, totaltime, virtalltime; >-+ #ifndef __FreeBSD__ >- unsigned long long int swapFree = 0; >-+ #endif >-+ int cpus = this->cpuCount; >-+ FILE* file = NULL; >- >-- FILE* file = fopen(PROCMEMINFOFILE, "r"); >-+ #ifdef __FreeBSD__ >-+ kvm_t *kd = NULL; >-+ struct kvm_swap kvmswapinfo[1]; >-+ size_t len = 0; >-+ #endif >-+ >-+ #ifndef __FreeBSD__ >-+ file = fopen(PROCMEMINFOFILE, "r"); >- assert(file != NULL); >-- int cpus = this->cpuCount; >- { >- char buffer[128]; >- while (fgets(buffer, 128, file)) { >-- >- switch (buffer[0]) { >- case 'M': >- if (String_startsWith(buffer, "MemTotal:")) >-@@ -700,10 +722,35 @@ >- } >- } >- } >-+ fclose(file); >-+ #endif >- >-+ #ifdef __FreeBSD__ >-+ len = sizeof(this->totalMem); >-+ SYSCTLBYNAME("vm.stats.vm.v_page_count", this->totalMem, len); >-+ this->totalMem *= PAGE_SIZE / KB; >-+ len = sizeof(this->cachedMem); >-+ SYSCTLBYNAME("vm.stats.vm.v_cache_count", this->cachedMem, len); >-+ this->cachedMem *= PAGE_SIZE / KB; >-+ len = sizeof(this->buffersMem); >-+ SYSCTLBYNAME("vfs.bufspace", this->buffersMem, len); >-+ this->buffersMem /= KB; >-+ len = sizeof(this->usedMem); >-+ SYSCTLBYNAME("vm.stats.vm.v_active_count", this->usedMem, len); >-+ this->usedMem = this->usedMem * PAGE_SIZE / KB + this->cachedMem + this->buffersMem; >-+ this->freeMem = this->totalMem - this->usedMem; >-+ kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, NULL); >-+ assert(kd != NULL); >-+ kvm_getswapinfo(kd, kvmswapinfo, 1, 0); >-+ this->totalSwap = kvmswapinfo[0].ksw_total * PAGE_SIZE / KB; >-+ this->usedSwap = kvmswapinfo[0].ksw_used * PAGE_SIZE / KB; >-+ kvm_close(kd); >-+ #endif >-+ >-+ #ifndef __FreeBSD__ >- this->usedMem = this->totalMem - this->freeMem; >- this->usedSwap = this->totalSwap - swapFree; >-- fclose(file); >-+ #endif >- >- file = fopen(PROCSTATFILE, "r"); >- assert(file != NULL); >diff -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/files/patch-RichString.c /usr/ports/sysutils/htop/files/patch-RichString.c >--- /usr/ports/sysutils/htop.orig/files/patch-RichString.c 2012-03-04 01:13:21.000000000 +0800 >+++ /usr/ports/sysutils/htop/files/patch-RichString.c 1970-01-01 08:00:00.000000000 +0800 >@@ -1,14 +0,0 @@ >---- RichString.c.orig >-+++ RichString.c >-@@ -13,7 +13,11 @@ >- #include "debug.h" >- #include <assert.h> >- #ifdef HAVE_LIBNCURSESW >-+# ifdef HAVE_NCURSESW_CURSES_H >- #include <ncursesw/curses.h> >-+# else >-+#include <curses.h> >-+# endif >- #else >- #include <curses.h> >- #endif >diff -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/files/patch-RichString.h /usr/ports/sysutils/htop/files/patch-RichString.h >--- /usr/ports/sysutils/htop.orig/files/patch-RichString.h 2012-03-04 01:13:21.000000000 +0800 >+++ /usr/ports/sysutils/htop/files/patch-RichString.h 1970-01-01 08:00:00.000000000 +0800 >@@ -1,14 +0,0 @@ >---- RichString.h.orig >-+++ RichString.h >-@@ -16,7 +16,11 @@ >- #include "debug.h" >- #include <assert.h> >- #ifdef HAVE_LIBNCURSESW >-+# ifdef HAVE_NCURSESW_CURSES_H >- #include <ncursesw/curses.h> >-+# else >-+#include <curses.h> >-+# endif >- #else >- #include <curses.h> >- #endif >diff -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/files/patch-configure.ac /usr/ports/sysutils/htop/files/patch-configure.ac >--- /usr/ports/sysutils/htop.orig/files/patch-configure.ac 2012-03-04 01:13:21.000000000 +0800 >+++ /usr/ports/sysutils/htop/files/patch-configure.ac 1970-01-01 08:00:00.000000000 +0800 >@@ -1,19 +0,0 @@ >---- ./configure.ac.orig 2010-11-23 17:56:32.000000000 +0200 >-+++ ./configure.ac 2011-08-11 12:50:44.000000000 +0300 >-@@ -18,6 +18,7 @@ >- >- # Checks for libraries. >- AC_CHECK_LIB([m], [ceil], [], [missing_libraries="$missing_libraries libm"]) >-+AC_CHECK_LIB([kvm], [kvm_open], [], [missing_libraries="$missing_libraries libkvm"]) >- >- # Checks for header files. >- AC_HEADER_DIRENT >-@@ -86,7 +87,7 @@ >- AC_ARG_ENABLE(unicode, [AC_HELP_STRING([--enable-unicode], [enable Unicode support])], ,enable_unicode="no") >- if test "x$enable_unicode" = xyes; then >- AC_CHECK_LIB([ncursesw], [refresh], [], [missing_libraries="$missing_libraries libncursesw"]) >-- AC_CHECK_HEADERS([ncursesw/curses.h],[:],[missing_headers="$missing_headers $ac_header"]) >-+ AC_CHECK_HEADERS([curses.h],[:],[missing_headers="$missing_headers $ac_header"]) >- else >- AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"]) >- AC_CHECK_HEADERS([curses.h],[:],[missing_headers="$missing_headers $ac_header"]) >diff -ruN --exclude=CVS /usr/ports/sysutils/htop.orig/pkg-message /usr/ports/sysutils/htop/pkg-message >--- /usr/ports/sysutils/htop.orig/pkg-message 2012-03-04 01:13:21.000000000 +0800 >+++ /usr/ports/sysutils/htop/pkg-message 2012-03-04 01:22:44.000000000 +0800 >@@ -1,6 +1,6 @@ > *********************************************************** > htop(1) requires linprocfs(5) to be mounted. If you don't > have it mounted already, please add this line to /etc/fstab >-and run `mount linproc`: >+and run `mkdir -p /usr/compat/linux/proc; ln -s /usr/compat /compat; mount linproc`: > linproc /compat/linux/proc linprocfs rw 0 0 > *********************************************************** >===> Done
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 165661
: 122453