Hello community,
here is the log from the commit of package htop
checked in at Wed Sep 24 16:49:35 CEST 2008.
--------
--- htop/htop.changes 2008-07-31 13:58:52.000000000 +0200
+++ /mounts/work_src_done/STABLE/htop/htop.changes 2008-09-23 19:19:35.907052000 +0200
@@ -1,0 +2,8 @@
+Tue Sep 23 19:15:12 CEST 2008 - thoenig@suse.de
+
+- Linux-VServer support
+- battery meter
+- fix collection of IO stats in multithreaded processes
+- remove assertion that fails on hardened kernels
+
+-------------------------------------------------------------------
Old:
----
htop-0.8.tar.bz2
New:
----
htop-0.8.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ htop.spec ++++++
--- /var/tmp/diff_new_pack.G19544/_old 2008-09-24 16:49:23.000000000 +0200
+++ /var/tmp/diff_new_pack.G19544/_new 2008-09-24 16:49:23.000000000 +0200
@@ -1,10 +1,17 @@
#
-# spec file for package htop (Version 0.8)
+# spec file for package htop (Version 0.8.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@@ -14,8 +21,8 @@
Name: htop
Url: http://htop.sourceforge.net
Summary: An Interactive text-mode Process Viewer for Linux
-Version: 0.8
-Release: 7
+Version: 0.8.1
+Release: 1
License: GPL v2 or later
Group: System/Monitoring
Source0: %{name}-%{version}.tar.bz2
@@ -60,6 +67,11 @@
%{_mandir}/*/%{name}*
%changelog
+* Tue Sep 23 2008 thoenig@suse.de
+- Linux-VServer support
+- battery meter
+- fix collection of IO stats in multithreaded processes
+- remove assertion that fails on hardened kernels
* Thu Jul 31 2008 puzel@suse.cz
- configure with --enable-taskstats to enable
per-processes IO statistics
++++++ htop-0.8.tar.bz2 -> htop-0.8.1.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/BatteryMeter.c new/htop-0.8.1/BatteryMeter.c
--- old/htop-0.8/BatteryMeter.c 1970-01-01 01:00:00.000000000 +0100
+++ new/htop-0.8.1/BatteryMeter.c 2008-09-23 07:35:32.000000000 +0200
@@ -0,0 +1,141 @@
+/*
+ htop
+ (C) 2004-2006 Hisham H. Muhammad
+ Released under the GNU GPL, see the COPYING file
+ in the source distribution for its full text.
+
+ This "Meter" written by Ian P. Hands (iphands@gmail.com).
+*/
+
+#include "BatteryMeter.h"
+#include "Meter.h"
+#include "ProcessList.h"
+#include "CRT.h"
+#include "String.h"
+#include "debug.h"
+
+int BatteryMeter_attributes[] = {
+ BATTERY
+};
+
+static unsigned long int parseBatInfo(const char * fileName, const unsigned short int lineNum, const unsigned short int wordNum) {
+ const DIR *batteryDir;
+ const struct dirent *pDirEnt;
+
+ const char batteryPath[] = PROCDIR "/acpi/battery/";
+ batteryDir = opendir(batteryPath);
+
+ if (batteryDir == NULL) {
+ return 0;
+ }
+
+ char * string;
+ typedef struct listLbl { char* content; struct listLbl* next; } list;
+
+ list *myList = NULL;
+ list *newEntry;
+
+ /*
+ Some of this is based off of code found in kismet (they claim it came from gkrellm).
+ Written for multi battery use...
+ */
+ for (pDirEnt= readdir((DIR*)batteryDir); pDirEnt; pDirEnt = readdir((DIR*)batteryDir)) {
+ string = (char*)pDirEnt->d_name;
+ if(!strcmp(string, ".") || !strcmp(string, ".."))
+ continue;
+
+ newEntry = calloc(1, sizeof(list));
+ newEntry->next = myList;
+ newEntry->content = string;
+ myList = newEntry;
+ }
+
+ unsigned long int total = 0;
+ for (newEntry = myList; newEntry; newEntry = newEntry->next) {
+ const char infoPath[30];
+ const FILE * file;
+ char line[50];
+
+ sprintf((char*)infoPath, "%s%s/%s", batteryPath, newEntry->content, fileName);
+
+ if ((file = fopen(infoPath, "r")) == NULL) {
+ return 0;
+ }
+
+ for (unsigned short int i = 0; i < lineNum; i++){
+ fgets(line, sizeof line, (FILE*)file);
+ }
+
+ fclose((FILE*)file);
+
+ const char * foundNumTmp = String_getToken(line, wordNum);
+ const unsigned long int foundNum = atoi(foundNumTmp);
+ free((char*)foundNumTmp);
+
+ total += foundNum;
+ }
+
+ free(myList);
+ free(newEntry);
+ closedir((DIR*)batteryDir);
+ return total;
+}
+
+static void BatteryMeter_setValues(Meter* this, char* buffer, int len) {
+ FILE* file = fopen(PROCDIR "/acpi/ac_adapter/AC/state", "r");
+ if (!file)
+ file = fopen(PROCDIR "/acpi/ac_adapter/ADP1/state", "r");
+ if (!file) {
+ snprintf(buffer, len, "n/a");
+ return;
+ }
+
+ char line [100];
+ fgets(line, sizeof line, file);
+ line[sizeof(line) - 1] = '\0';
+ fclose(file);
+
+ const unsigned long int totalFull = parseBatInfo("info", 3, 4);
+ const unsigned long int totalRemain = parseBatInfo("state", 5, 3);
+ const double percent = totalFull > 0 ? ((double)totalRemain * 100) / (double)totalFull : 0;
+
+ if (totalFull == 0) {
+ snprintf(buffer, len, "n/a");
+ return;
+ }
+
+ this->values[0] = percent;
+
+ const char* isOnline = String_getToken(line, 2);
+
+ char *onAcText, *onBatteryText;
+
+ if (this->mode == TEXT_METERMODE) {
+ onAcText = "%.1f%% (Running on A/C)";
+ onBatteryText = "%.1f%% (Running on battery)";
+ } else {
+ onAcText = "%.1f%%(A/C)";
+ onBatteryText = "%.1f%%(bat)";
+ }
+
+ if (strcmp(String_getToken(line, 2),"on-line") == 0) {
+ snprintf(buffer, len, onAcText, percent);
+ } else {
+ snprintf(buffer, len, onBatteryText, percent);
+ }
+
+ free((char*)isOnline);
+ return;
+}
+
+MeterType BatteryMeter = {
+ .setValues = BatteryMeter_setValues,
+ .display = NULL,
+ .mode = TEXT_METERMODE,
+ .items = 1,
+ .total = 100.0,
+ .attributes = BatteryMeter_attributes,
+ .name = "Battery",
+ .uiName = "Battery",
+ .caption = "Battery: "
+};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/BatteryMeter.h new/htop-0.8.1/BatteryMeter.h
--- old/htop-0.8/BatteryMeter.h 1970-01-01 01:00:00.000000000 +0100
+++ new/htop-0.8.1/BatteryMeter.h 2008-09-23 07:35:33.000000000 +0200
@@ -0,0 +1,24 @@
+/* Do not edit this file. It was automatically generated. */
+
+#ifndef HEADER_BatteryMeter
+#define HEADER_BatteryMeter
+/*
+ htop
+ (C) 2004-2006 Hisham H. Muhammad
+ Released under the GNU GPL, see the COPYING file
+ in the source distribution for its full text.
+
+ This "Meter" written by Ian P. Hands (iphands@gmail.com).
+*/
+
+#include "Meter.h"
+#include "ProcessList.h"
+#include "CRT.h"
+#include "String.h"
+#include "debug.h"
+
+extern int BatteryMeter_attributes[];
+
+extern MeterType BatteryMeter;
+
+#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/ChangeLog new/htop-0.8.1/ChangeLog
--- old/htop-0.8/ChangeLog 2008-05-08 00:51:23.000000000 +0200
+++ new/htop-0.8.1/ChangeLog 2008-09-23 08:24:04.000000000 +0200
@@ -1,4 +1,15 @@
+What's new in version 0.8.1
+
+* Linux-VServer support
+ (thanks to Jonathan Sambrook and Benedikt Bohm)
+* Battery meter
+ (thanks to Ian Page Hands)
+* BUGFIX: Fix collection of IO stats in multithreaded processes
+ (thanks to Gerhard Heift)
+* Remove assertion that fails on hardened kernels
+ (thanks to Wolfram Schlich for the report)
+
What's new in version 0.8
* Ability to change sort column with the mouse by
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/config.h new/htop-0.8.1/config.h
--- old/htop-0.8/config.h 2008-05-08 00:53:50.000000000 +0200
+++ new/htop-0.8.1/config.h 2008-09-23 07:15:09.000000000 +0200
@@ -4,6 +4,9 @@
/* Define to 1 if the `closedir' function returns void instead of `int'. */
/* #undef CLOSEDIR_VOID */
+/* Define if ancient vserver support enabled. */
+/* #undef HAVE_ANCIENT_VSERVER */
+
/* Define to 1 if you have the header file. */
#define HAVE_CURSES_H 1
@@ -100,6 +103,9 @@
/* Define to 1 if you have the header file. */
#define HAVE_UNISTD_H 1
+/* Define if vserver support enabled. */
+/* #undef HAVE_VSERVER */
+
/* Define to 1 if the system has the type `_Bool'. */
#define HAVE__BOOL 1
@@ -120,13 +126,13 @@
#define PACKAGE_NAME "htop"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "htop 0.8"
+#define PACKAGE_STRING "htop 0.8.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "htop"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.8"
+#define PACKAGE_VERSION "0.8.1"
/* The PLPA symbol prefix */
#define PLPA_SYM_PREFIX plpa_
@@ -144,7 +150,7 @@
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "0.8"
+#define VERSION "0.8.1"
/* Emulated value */
/* #undef __NR_sched_getaffinity */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/config.h.in new/htop-0.8.1/config.h.in
--- old/htop-0.8/config.h.in 2008-05-08 00:53:51.000000000 +0200
+++ new/htop-0.8.1/config.h.in 2008-09-23 07:15:11.000000000 +0200
@@ -3,6 +3,9 @@
/* Define to 1 if the `closedir' function returns void instead of `int'. */
#undef CLOSEDIR_VOID
+/* Define if ancient vserver support enabled. */
+#undef HAVE_ANCIENT_VSERVER
+
/* Define to 1 if you have the header file. */
#undef HAVE_CURSES_H
@@ -99,6 +102,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_UNISTD_H
+/* Define if vserver support enabled. */
+#undef HAVE_VSERVER
+
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/configure new/htop-0.8.1/configure
--- old/htop-0.8/configure 2008-05-08 00:53:28.000000000 +0200
+++ new/htop-0.8.1/configure 2008-09-23 07:14:26.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for htop 0.8.
+# Generated by GNU Autoconf 2.61 for htop 0.8.1.
#
# Report bugs to .
#
@@ -728,8 +728,8 @@
# Identity of this package.
PACKAGE_NAME='htop'
PACKAGE_TARNAME='htop'
-PACKAGE_VERSION='0.8'
-PACKAGE_STRING='htop 0.8'
+PACKAGE_VERSION='0.8.1'
+PACKAGE_STRING='htop 0.8.1'
PACKAGE_BUGREPORT='loderunner@users.sourceforge.net'
ac_unique_file="htop.c"
@@ -1395,7 +1395,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures htop 0.8 to adapt to many kinds of systems.
+\`configure' configures htop 0.8.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1465,7 +1465,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of htop 0.8:";;
+ short | recursive ) echo "Configuration of htop 0.8.1:";;
esac
cat <<\_ACEOF
@@ -1480,6 +1480,10 @@
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-openvz enable OpenVZ support
+ --enable-vserver enable VServer support
+ --enable-ancient-vserver
+ enable ancient VServer support (implies
+ --enable-vserver)
--enable-taskstats enable per-task IO Stats (taskstats kernel sup
required)
--enable-unicode enable Unicode support
@@ -1575,7 +1579,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-htop configure 0.8
+htop configure 0.8.1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1589,7 +1593,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by htop $as_me 0.8, which was
+It was created by htop $as_me 0.8.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2279,7 +2283,7 @@
# Define the identity of the package.
PACKAGE='htop'
- VERSION='0.8'
+ VERSION='0.8.1'
cat >>confdefs.h <<_ACEOF
@@ -4455,7 +4459,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4458 "configure"' > conftest.$ac_ext
+ echo '#line 4462 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7197,11 +7201,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7200: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7204: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7204: \$? = $ac_status" >&5
+ echo "$as_me:7208: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7487,11 +7491,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7490: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7494: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7494: \$? = $ac_status" >&5
+ echo "$as_me:7498: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7591,11 +7595,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7594: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7598: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7598: \$? = $ac_status" >&5
+ echo "$as_me:7602: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9940,7 +9944,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext < conftest.$ac_ext <&5)
+ (eval echo "\"\$as_me:12467: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12467: \$? = $ac_status" >&5
+ echo "$as_me:12471: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12564,11 +12568,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12567: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12571: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12571: \$? = $ac_status" >&5
+ echo "$as_me:12575: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14126,11 +14130,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14129: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14133: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14133: \$? = $ac_status" >&5
+ echo "$as_me:14137: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14230,11 +14234,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14233: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14237: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14237: \$? = $ac_status" >&5
+ echo "$as_me:14241: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16417,11 +16421,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16420: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16424: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16424: \$? = $ac_status" >&5
+ echo "$as_me:16428: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16707,11 +16711,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16710: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16714: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16714: \$? = $ac_status" >&5
+ echo "$as_me:16718: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16811,11 +16815,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16814: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16818: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16818: \$? = $ac_status" >&5
+ echo "$as_me:16822: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -21466,6 +21470,41 @@
fi
+# Check whether --enable-vserver was given.
+if test "${enable_vserver+set}" = set; then
+ enableval=$enable_vserver;
+else
+ enable_vserver="no"
+fi
+
+if test "x$enable_vserver" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VSERVER 1
+_ACEOF
+
+fi
+
+# Check whether --enable-ancient_vserver was given.
+if test "${enable_ancient_vserver+set}" = set; then
+ enableval=$enable_ancient_vserver;
+else
+ enable_ancient_vserver="no"
+fi
+
+if test "x$enable_ancient_vserver" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VSERVER 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ANCIENT_VSERVER 1
+_ACEOF
+
+fi
+
# Check whether --enable-taskstats was given.
if test "${enable_taskstats+set}" = set; then
enableval=$enable_taskstats;
@@ -22830,7 +22869,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by htop $as_me 0.8, which was
+This file was extended by htop $as_me 0.8.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22883,7 +22922,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-htop config.status 0.8
+htop config.status 0.8.1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/configure.ac new/htop-0.8.1/configure.ac
--- old/htop-0.8/configure.ac 2008-05-08 00:51:05.000000000 +0200
+++ new/htop-0.8.1/configure.ac 2008-09-23 07:13:57.000000000 +0200
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
-AC_INIT([htop],[0.8],[loderunner@users.sourceforge.net])
+AC_INIT([htop],[0.8.1],[loderunner@users.sourceforge.net])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([htop.c])
AC_CONFIG_HEADER([config.h])
@@ -69,6 +69,17 @@
AC_DEFINE(HAVE_OPENVZ, 1, [Define if openvz support enabled.])
fi
+AC_ARG_ENABLE(vserver, [AC_HELP_STRING([--enable-vserver], [enable VServer support])], ,enable_vserver="no")
+if test "x$enable_vserver" = xyes; then
+ AC_DEFINE(HAVE_VSERVER, 1, [Define if vserver support enabled.])
+fi
+
+AC_ARG_ENABLE(ancient_vserver, [AC_HELP_STRING([--enable-ancient-vserver], [enable ancient VServer support (implies --enable-vserver)])], ,enable_ancient_vserver="no")
+if test "x$enable_ancient_vserver" = xyes; then
+ AC_DEFINE(HAVE_VSERVER, 1, [Define if vserver support enabled.])
+ AC_DEFINE(HAVE_ANCIENT_VSERVER, 1, [Define if ancient vserver support enabled.])
+fi
+
AC_ARG_ENABLE(taskstats, [AC_HELP_STRING([--enable-taskstats], [enable per-task IO Stats (taskstats kernel sup required)])], ,enable_taskstats="yes")
if test "x$enable_taskstats" = xyes; then
AC_DEFINE(HAVE_TASKSTATS, 1, [Define if taskstats support enabled.])
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/CRT.c new/htop-0.8.1/CRT.c
--- old/htop-0.8/CRT.c 2008-03-09 09:53:36.000000000 +0100
+++ new/htop-0.8.1/CRT.c 2008-09-23 07:07:08.000000000 +0200
@@ -56,6 +56,7 @@
METER_VALUE,
LED_COLOR,
UPTIME,
+ BATTERY,
TASKS_TOTAL,
TASKS_RUNNING,
SWAP,
@@ -216,6 +217,7 @@
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = A_BOLD;
CRT_colors[FAILED_SEARCH] = A_REVERSE | A_BOLD;
CRT_colors[UPTIME] = A_BOLD;
+ CRT_colors[BATTERY] = A_BOLD;
CRT_colors[LARGE_NUMBER] = A_BOLD;
CRT_colors[METER_TEXT] = A_NORMAL;
CRT_colors[METER_VALUE] = A_BOLD;
@@ -273,6 +275,7 @@
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = ColorPair(Blue,White);
CRT_colors[FAILED_SEARCH] = ColorPair(Red,Cyan);
CRT_colors[UPTIME] = ColorPair(Yellow,White);
+ CRT_colors[BATTERY] = ColorPair(Yellow,White);
CRT_colors[LARGE_NUMBER] = ColorPair(Red,White);
CRT_colors[METER_TEXT] = ColorPair(Blue,White);
CRT_colors[METER_VALUE] = ColorPair(Black,White);
@@ -330,6 +333,7 @@
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = ColorPair(Blue,Black);
CRT_colors[FAILED_SEARCH] = ColorPair(Red,Cyan);
CRT_colors[UPTIME] = ColorPair(Yellow,Black);
+ CRT_colors[BATTERY] = ColorPair(Yellow,Black);
CRT_colors[LARGE_NUMBER] = ColorPair(Red,Black);
CRT_colors[METER_TEXT] = ColorPair(Blue,Black);
CRT_colors[METER_VALUE] = ColorPair(Black,Black);
@@ -387,6 +391,7 @@
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = A_BOLD | ColorPair(Yellow,Blue);
CRT_colors[FAILED_SEARCH] = ColorPair(Red,Cyan);
CRT_colors[UPTIME] = A_BOLD | ColorPair(Yellow,Blue);
+ CRT_colors[BATTERY] = A_BOLD | ColorPair(Yellow,Blue);
CRT_colors[LARGE_NUMBER] = A_BOLD | ColorPair(Red,Blue);
CRT_colors[METER_TEXT] = ColorPair(Cyan,Blue);
CRT_colors[METER_VALUE] = A_BOLD | ColorPair(Cyan,Blue);
@@ -444,6 +449,7 @@
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = ColorPair(Black,White);
CRT_colors[FAILED_SEARCH] = ColorPair(Red,Cyan);
CRT_colors[UPTIME] = ColorPair(Green,Black);
+ CRT_colors[BATTERY] = ColorPair(Green,Black);
CRT_colors[LARGE_NUMBER] = A_BOLD | ColorPair(Red,Black);
CRT_colors[METER_TEXT] = ColorPair(Cyan,Black);
CRT_colors[METER_VALUE] = ColorPair(Green,Black);
@@ -502,6 +508,7 @@
CRT_colors[PANEL_HIGHLIGHT_UNFOCUS] = ColorPair(Black,White);
CRT_colors[FAILED_SEARCH] = ColorPair(Red,Cyan);
CRT_colors[UPTIME] = A_BOLD | ColorPair(Cyan,Black);
+ CRT_colors[BATTERY] = A_BOLD | ColorPair(Cyan,Black);
CRT_colors[LARGE_NUMBER] = A_BOLD | ColorPair(Red,Black);
CRT_colors[METER_TEXT] = ColorPair(Cyan,Black);
CRT_colors[METER_VALUE] = A_BOLD | ColorPair(Cyan,Black);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/CRT.h new/htop-0.8.1/CRT.h
--- old/htop-0.8/CRT.h 2008-03-09 09:53:37.000000000 +0100
+++ new/htop-0.8.1/CRT.h 2008-09-23 07:07:11.000000000 +0200
@@ -58,6 +58,7 @@
METER_VALUE,
LED_COLOR,
UPTIME,
+ BATTERY,
TASKS_TOTAL,
TASKS_RUNNING,
SWAP,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/Makefile.am new/htop-0.8.1/Makefile.am
--- old/htop-0.8/Makefile.am 2008-03-09 01:00:30.000000000 +0100
+++ new/htop-0.8.1/Makefile.am 2008-09-23 07:03:47.000000000 +0200
@@ -17,7 +17,7 @@
ClockMeter.c ColorsPanel.c ColumnsPanel.c CPUMeter.c CRT.c DebugMemory.c \
DisplayOptionsPanel.c FunctionBar.c Hashtable.c Header.c htop.c ListItem.c \
LoadAverageMeter.c MemoryMeter.c Meter.c MetersPanel.c Object.c Panel.c \
-Process.c ProcessList.c RichString.c ScreenManager.c Settings.c \
+BatteryMeter.c Process.c ProcessList.c RichString.c ScreenManager.c Settings.c \
SignalItem.c SignalsPanel.c String.c SwapMeter.c TasksMeter.c TraceScreen.c \
UptimeMeter.c UsersTable.c Vector.c AvailableColumnsPanel.c AffinityPanel.c
@@ -25,7 +25,7 @@
CategoriesPanel.h CheckItem.h ClockMeter.h ColorsPanel.h ColumnsPanel.h \
CPUMeter.h CRT.h DebugMemory.h DisplayOptionsPanel.h FunctionBar.h \
Hashtable.h Header.h htop.h ListItem.h LoadAverageMeter.h MemoryMeter.h \
-Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \
+BatteryMeter.h Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \
ScreenManager.h Settings.h SignalItem.h SignalsPanel.h String.h \
SwapMeter.h TasksMeter.h TraceScreen.h UptimeMeter.h UsersTable.h Vector.h \
Process.h AffinityPanel.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/Makefile.in new/htop-0.8.1/Makefile.in
--- old/htop-0.8/Makefile.in 2008-05-08 00:53:27.000000000 +0200
+++ new/htop-0.8.1/Makefile.in 2008-09-23 07:14:30.000000000 +0200
@@ -67,14 +67,14 @@
htop-LoadAverageMeter.$(OBJEXT) htop-MemoryMeter.$(OBJEXT) \
htop-Meter.$(OBJEXT) htop-MetersPanel.$(OBJEXT) \
htop-Object.$(OBJEXT) htop-Panel.$(OBJEXT) \
- htop-Process.$(OBJEXT) htop-ProcessList.$(OBJEXT) \
- htop-RichString.$(OBJEXT) htop-ScreenManager.$(OBJEXT) \
- htop-Settings.$(OBJEXT) htop-SignalItem.$(OBJEXT) \
- htop-SignalsPanel.$(OBJEXT) htop-String.$(OBJEXT) \
- htop-SwapMeter.$(OBJEXT) htop-TasksMeter.$(OBJEXT) \
- htop-TraceScreen.$(OBJEXT) htop-UptimeMeter.$(OBJEXT) \
- htop-UsersTable.$(OBJEXT) htop-Vector.$(OBJEXT) \
- htop-AvailableColumnsPanel.$(OBJEXT) \
+ htop-BatteryMeter.$(OBJEXT) htop-Process.$(OBJEXT) \
+ htop-ProcessList.$(OBJEXT) htop-RichString.$(OBJEXT) \
+ htop-ScreenManager.$(OBJEXT) htop-Settings.$(OBJEXT) \
+ htop-SignalItem.$(OBJEXT) htop-SignalsPanel.$(OBJEXT) \
+ htop-String.$(OBJEXT) htop-SwapMeter.$(OBJEXT) \
+ htop-TasksMeter.$(OBJEXT) htop-TraceScreen.$(OBJEXT) \
+ htop-UptimeMeter.$(OBJEXT) htop-UsersTable.$(OBJEXT) \
+ htop-Vector.$(OBJEXT) htop-AvailableColumnsPanel.$(OBJEXT) \
htop-AffinityPanel.$(OBJEXT)
am_htop_OBJECTS = $(am__objects_1) $(am__objects_2)
htop_OBJECTS = $(am_htop_OBJECTS)
@@ -252,7 +252,7 @@
ClockMeter.c ColorsPanel.c ColumnsPanel.c CPUMeter.c CRT.c DebugMemory.c \
DisplayOptionsPanel.c FunctionBar.c Hashtable.c Header.c htop.c ListItem.c \
LoadAverageMeter.c MemoryMeter.c Meter.c MetersPanel.c Object.c Panel.c \
-Process.c ProcessList.c RichString.c ScreenManager.c Settings.c \
+BatteryMeter.c Process.c ProcessList.c RichString.c ScreenManager.c Settings.c \
SignalItem.c SignalsPanel.c String.c SwapMeter.c TasksMeter.c TraceScreen.c \
UptimeMeter.c UsersTable.c Vector.c AvailableColumnsPanel.c AffinityPanel.c
@@ -260,7 +260,7 @@
CategoriesPanel.h CheckItem.h ClockMeter.h ColorsPanel.h ColumnsPanel.h \
CPUMeter.h CRT.h DebugMemory.h DisplayOptionsPanel.h FunctionBar.h \
Hashtable.h Header.h htop.h ListItem.h LoadAverageMeter.h MemoryMeter.h \
-Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \
+BatteryMeter.h Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \
ScreenManager.h Settings.h SignalItem.h SignalsPanel.h String.h \
SwapMeter.h TasksMeter.h TraceScreen.h UptimeMeter.h UsersTable.h Vector.h \
Process.h AffinityPanel.h
@@ -365,6 +365,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htop-AffinityPanel.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htop-AvailableColumnsPanel.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htop-AvailableMetersPanel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htop-BatteryMeter.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htop-CPUMeter.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htop-CRT.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htop-CategoriesPanel.Po@am__quote@
@@ -715,6 +716,20 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(htop_CFLAGS) $(CFLAGS) -c -o htop-Panel.obj `if test -f 'Panel.c'; then $(CYGPATH_W) 'Panel.c'; else $(CYGPATH_W) '$(srcdir)/Panel.c'; fi`
+htop-BatteryMeter.o: BatteryMeter.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(htop_CFLAGS) $(CFLAGS) -MT htop-BatteryMeter.o -MD -MP -MF $(DEPDIR)/htop-BatteryMeter.Tpo -c -o htop-BatteryMeter.o `test -f 'BatteryMeter.c' || echo '$(srcdir)/'`BatteryMeter.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/htop-BatteryMeter.Tpo $(DEPDIR)/htop-BatteryMeter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BatteryMeter.c' object='htop-BatteryMeter.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(htop_CFLAGS) $(CFLAGS) -c -o htop-BatteryMeter.o `test -f 'BatteryMeter.c' || echo '$(srcdir)/'`BatteryMeter.c
+
+htop-BatteryMeter.obj: BatteryMeter.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(htop_CFLAGS) $(CFLAGS) -MT htop-BatteryMeter.obj -MD -MP -MF $(DEPDIR)/htop-BatteryMeter.Tpo -c -o htop-BatteryMeter.obj `if test -f 'BatteryMeter.c'; then $(CYGPATH_W) 'BatteryMeter.c'; else $(CYGPATH_W) '$(srcdir)/BatteryMeter.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/htop-BatteryMeter.Tpo $(DEPDIR)/htop-BatteryMeter.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BatteryMeter.c' object='htop-BatteryMeter.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(htop_CFLAGS) $(CFLAGS) -c -o htop-BatteryMeter.obj `if test -f 'BatteryMeter.c'; then $(CYGPATH_W) 'BatteryMeter.c'; else $(CYGPATH_W) '$(srcdir)/BatteryMeter.c'; fi`
+
htop-Process.o: Process.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(htop_CFLAGS) $(CFLAGS) -MT htop-Process.o -MD -MP -MF $(DEPDIR)/htop-Process.Tpo -c -o htop-Process.o `test -f 'Process.c' || echo '$(srcdir)/'`Process.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/htop-Process.Tpo $(DEPDIR)/htop-Process.Po
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/Meter.c new/htop-0.8.1/Meter.c
--- old/htop-0.8/Meter.c 2008-03-09 09:48:55.000000000 +0100
+++ new/htop-0.8.1/Meter.c 2008-09-23 07:51:08.000000000 +0200
@@ -96,8 +96,10 @@
#include "TasksMeter.h"
#include "LoadAverageMeter.h"
#include "UptimeMeter.h"
+#include "BatteryMeter.h"
#include "ClockMeter.h"
+
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
@@ -120,6 +122,7 @@
&SwapMeter,
&TasksMeter,
&UptimeMeter,
+ &BatteryMeter,
&AllCPUsMeter,
NULL
};
@@ -242,8 +245,8 @@
w -= 2;
attrset(CRT_colors[METER_TEXT]);
- mvaddstr(y, x, this->caption);
- int captionLen = strlen(this->caption);
+ int captionLen = 3;
+ mvaddnstr(y, x, this->caption, captionLen);
x += captionLen;
w -= captionLen;
attrset(CRT_colors[BAR_BORDER]);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/Meter.h new/htop-0.8.1/Meter.h
--- old/htop-0.8/Meter.h 2008-03-09 09:48:57.000000000 +0100
+++ new/htop-0.8.1/Meter.h 2008-09-23 08:29:01.000000000 +0200
@@ -97,8 +97,10 @@
#include "TasksMeter.h"
#include "LoadAverageMeter.h"
#include "UptimeMeter.h"
+#include "BatteryMeter.h"
#include "ClockMeter.h"
+
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/Process.c new/htop-0.8.1/Process.c
--- old/htop-0.8/Process.c 2008-03-14 19:35:05.000000000 +0100
+++ new/htop-0.8.1/Process.c 2008-09-23 05:43:34.000000000 +0200
@@ -49,6 +49,9 @@
#ifdef HAVE_OPENVZ
VEID, VPID,
#endif
+ #ifdef HAVE_VSERVER
+ VXID,
+ #endif
#ifdef HAVE_TASKSTATS
RCHAR, WCHAR, SYSCR, SYSCW, RBYTES, WBYTES, CNCLWB, IO_READ_RATE, IO_WRITE_RATE, IO_RATE,
#endif
@@ -124,6 +127,9 @@
unsigned int veid;
unsigned int vpid;
#endif
+ #ifdef HAVE_VSERVER
+ unsigned int vxid;
+ #endif
#ifdef HAVE_TASKSTATS
unsigned long long io_rchar;
unsigned long long io_wchar;
@@ -159,6 +165,9 @@
#ifdef HAVE_OPENVZ
"VEID", "VPID",
#endif
+#ifdef HAVE_VSERVER
+ "VXID",
+#endif
#ifdef HAVE_TASKSTATS
"RCHAR", "WCHAR", "SYSCR", "SYSCW", "RBYTES", "WBYTES", "CNCLWB",
"IO_READ_RATE", "IO_WRITE_RATE", "IO_RATE",
@@ -178,6 +187,9 @@
#ifdef HAVE_OPENVZ
" VEID ", " VPID ",
#endif
+#ifdef HAVE_VSERVER
+ " VXID ",
+#endif
#ifdef HAVE_TASKSTATS
" RD_CHAR ", " WR_CHAR ", " RD_SYSC ", " WR_SYSC ", " IO_RD ", " IO_WR ", " IO_CANCEL ",
" IORR ", " IOWR ", " IO ",
@@ -388,6 +400,9 @@
case VEID: snprintf(buffer, n, "%5u ", this->veid); break;
case VPID: snprintf(buffer, n, "%5u ", this->vpid); break;
#endif
+ #ifdef HAVE_VSERVER
+ case VXID: snprintf(buffer, n, "%5u ", this->vxid); break;
+ #endif
#ifdef HAVE_TASKSTATS
case RCHAR: snprintf(buffer, n, "%10llu ", this->io_rchar); break;
case WCHAR: snprintf(buffer, n, "%10llu ", this->io_wchar); break;
@@ -556,6 +571,10 @@
case VPID:
return (p1->vpid - p2->vpid);
#endif
+ #ifdef HAVE_VSERVER
+ case VXID:
+ return (p1->vxid - p2->vxid);
+ #endif
#ifdef HAVE_TASKSTATS
case RCHAR: diff = p2->io_rchar - p1->io_rchar; goto test_diff;
case WCHAR: diff = p2->io_wchar - p1->io_wchar; goto test_diff;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/Process.h new/htop-0.8.1/Process.h
--- old/htop-0.8/Process.h 2008-03-14 19:42:15.000000000 +0100
+++ new/htop-0.8.1/Process.h 2008-09-23 05:43:34.000000000 +0200
@@ -51,6 +51,9 @@
#ifdef HAVE_OPENVZ
VEID, VPID,
#endif
+ #ifdef HAVE_VSERVER
+ VXID,
+ #endif
#ifdef HAVE_TASKSTATS
RCHAR, WCHAR, SYSCR, SYSCW, RBYTES, WBYTES, CNCLWB, IO_READ_RATE, IO_WRITE_RATE, IO_RATE,
#endif
@@ -126,6 +129,9 @@
unsigned int veid;
unsigned int vpid;
#endif
+ #ifdef HAVE_VSERVER
+ unsigned int vxid;
+ #endif
#ifdef HAVE_TASKSTATS
unsigned long long io_rchar;
unsigned long long io_wchar;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/ProcessList.c new/htop-0.8.1/ProcessList.c
--- old/htop-0.8/ProcessList.c 2008-03-14 19:38:55.000000000 +0100
+++ new/htop-0.8.1/ProcessList.c 2008-09-23 08:23:14.000000000 +0200
@@ -371,7 +371,9 @@
// Take PID 1 as root and add to the new listing
int vsize = Vector_size(this->processes);
Process* init = (Process*) (Vector_take(this->processes, 0));
- assert(init->pid == 1);
+ // This assertion crashes on hardened kernels.
+ // I wonder how well tree view works on those systems.
+ // assert(init->pid == 1);
init->indent = 0;
Vector_add(this->processes2, init);
// Recursively empty list
@@ -565,10 +567,6 @@
process->tgid = parent->pid;
}
- #ifdef HAVE_TASKSTATS
- ProcessList_readIoFile(this, process, dirname, name);
- #endif
-
if (showUserlandThreads && (!parent || pid != parent->pid)) {
char subdirname[MAX_NAME+1];
snprintf(subdirname, MAX_NAME, "%s/%s/task", dirname, name);
@@ -577,6 +575,10 @@
continue;
}
+ #ifdef HAVE_TASKSTATS
+ ProcessList_readIoFile(this, process, dirname, name);
+ #endif
+
process->updated = true;
if (!existingProcess)
@@ -639,6 +641,40 @@
fclose(status);
}
#endif
+
+ #ifdef HAVE_VSERVER
+ snprintf(statusfilename, MAX_NAME, "%s/%s/status", dirname, name);
+ status = ProcessList_fopen(this, statusfilename, "r");
+ if (status == NULL)
+ goto errorReadingProcess;
+ else {
+ char buffer[256];
+ process->vxid = 0;
+ while (!feof(status)) {
+ char* ok = fgets(buffer, 255, status);
+ if (!ok)
+ break;
+
+ if (String_startsWith(buffer, "VxID:")) {
+ int vxid;
+ int ok = ProcessList_read(this, buffer, "VxID:\t%d", &vxid);
+ if (ok >= 1) {
+ process->vxid = vxid;
+ }
+ }
+ #if defined HAVE_ANCIENT_VSERVER
+ else if (String_startsWith(buffer, "s_context:")) {
+ int vxid;
+ int ok = ProcessList_read(this, buffer, "s_context:\t%d", &vxid);
+ if (ok >= 1) {
+ process->vxid = vxid;
+ }
+ }
+ #endif
+ }
+ fclose(status);
+ }
+ #endif
snprintf(statusfilename, MAX_NAME, "%s/%s/cmdline", dirname, name);
status = ProcessList_fopen(this, statusfilename, "r");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/String.c new/htop-0.8.1/String.c
--- old/htop-0.8/String.c 2008-03-09 09:35:59.000000000 +0100
+++ new/htop-0.8.1/String.c 2008-09-23 07:01:05.000000000 +0200
@@ -103,3 +103,30 @@
}
return 0;
}
+
+char* String_getToken(const char* line, const unsigned short int numMatch) {
+ const unsigned short int len = strlen(line);
+ char inWord = 0;
+ unsigned short int count = 0;
+ char match[50];
+
+ unsigned short int foundCount = 0;
+
+ for (unsigned short int i = 0; i < len; i++) {
+ char lastState = inWord;
+ inWord = line[i] == ' ' ? 0:1;
+
+ if (lastState == 0 && inWord == 1)
+ count++;
+
+ if(inWord == 1){
+ if (count == numMatch && line[i] != ' ' && line[i] != '\0' && line[i] != '\n' && line[i] != EOF) {
+ match[foundCount] = line[i];
+ foundCount++;
+ }
+ }
+ }
+
+ match[foundCount] = '\0';
+ return((char*)strdup(match));
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/htop-0.8/String.h new/htop-0.8.1/String.h
--- old/htop-0.8/String.h 2008-03-09 09:37:10.000000000 +0100
+++ new/htop-0.8.1/String.h 2008-09-23 07:06:38.000000000 +0200
@@ -33,4 +33,6 @@
int String_contains_i(char* s, char* match);
+char* String_getToken(const char* line, const unsigned short int numMatch);
+
#endif
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org