mirror of https://github.com/xzeldon/htop.git
Merge branch 'configure' of https://github.com/cgzones/htop into cgzones-configure
This commit is contained in:
commit
47a7d0bd74
|
@ -40,20 +40,20 @@ jobs:
|
||||||
- name: Distcheck
|
- name: Distcheck
|
||||||
run: make distcheck DISTCHECK_CONFIGURE_FLAGS=--enable-werror
|
run: make distcheck DISTCHECK_CONFIGURE_FLAGS=--enable-werror
|
||||||
|
|
||||||
build-ubuntu-latest-hwloc:
|
build-ubuntu-latest-full-featured:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: sudo apt-get install libncursesw5-dev libhwloc-dev
|
run: sudo apt-get install libncursesw5-dev libhwloc-dev libnl-3-dev libnl-genl-3-dev
|
||||||
- name: Bootstrap
|
- name: Bootstrap
|
||||||
run: ./autogen.sh
|
run: ./autogen.sh
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: ./configure --enable-werror --enable-hwloc
|
run: ./configure --enable-werror --enable-openvz --enable-cgroup --enable-vserver --enable-ancient-vserver --enable-taskstats --enable-unicode --enable-linux-affinity --enable-hwloc --enable-setuid --enable-delayacct
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make
|
run: make
|
||||||
- name: Distcheck
|
- name: Distcheck
|
||||||
run: make distcheck DISTCHECK_CONFIGURE_FLAGS='--enable-werror --enable-hwloc'
|
run: make distcheck DISTCHECK_CONFIGURE_FLAGS='--enable-werror --enable-openvz --enable-cgroup --enable-vserver --enable-ancient-vserver --enable-taskstats --enable-unicode --enable-linux-affinity --enable-hwloc --enable-setuid --enable-delayacct'
|
||||||
|
|
||||||
whitespace_check:
|
whitespace_check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
35
configure.ac
35
configure.ac
|
@ -111,20 +111,12 @@ AC_SUBST(wextra_flag)
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
PROCDIR=/proc
|
PROCDIR=/proc
|
||||||
|
|
||||||
AC_ARG_ENABLE(proc, [AS_HELP_STRING([--enable-proc], [use Linux-compatible proc filesystem])], enable_proc="yes", enable_proc="no")
|
|
||||||
if test "x$enable_proc" = xyes; then
|
|
||||||
# An enabled proc assumes we're emulating Linux.
|
|
||||||
my_htop_platform=linux
|
|
||||||
AC_DEFINE(HAVE_PROC, 1, [Define if using a Linux-compatible proc filesystem.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_ARG_WITH(proc, [AS_HELP_STRING([--with-proc=DIR], [Location of a Linux-compatible proc filesystem (default=/proc).])],
|
AC_ARG_WITH(proc, [AS_HELP_STRING([--with-proc=DIR], [Location of a Linux-compatible proc filesystem (default=/proc).])],
|
||||||
|
if test -n "$withval"; then
|
||||||
if test -n "$withval"; then
|
AC_DEFINE_UNQUOTED(PROCDIR, "$withval", [Path of proc filesystem])
|
||||||
AC_DEFINE_UNQUOTED(PROCDIR, "$withval", [Path of proc filesystem])
|
PROCDIR="$withval"
|
||||||
PROCDIR="$withval"
|
fi,
|
||||||
fi,
|
AC_DEFINE(PROCDIR, "/proc", [Path of proc filesystem]))
|
||||||
AC_DEFINE(PROCDIR, "/proc", [Path of proc filesystem]))
|
|
||||||
|
|
||||||
if test "x$cross_compiling" = xno; then
|
if test "x$cross_compiling" = xno; then
|
||||||
if test "x$enable_proc" = xyes; then
|
if test "x$enable_proc" = xyes; then
|
||||||
|
@ -340,3 +332,20 @@ then
|
||||||
echo "****************************************************************"
|
echo "****************************************************************"
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_MSG_RESULT([
|
||||||
|
${PACKAGE_NAME} ${VERSION}
|
||||||
|
|
||||||
|
platform: $my_htop_platform
|
||||||
|
proc directory: $PROCDIR
|
||||||
|
openvz: $enable_openvz
|
||||||
|
cgroup: $enable_cgroup
|
||||||
|
vserver: $enable_vserver
|
||||||
|
ancient vserver: $enable_ancient_vserver
|
||||||
|
taskstats: $enable_taskstats
|
||||||
|
unicode: $enable_unicode
|
||||||
|
linux affinity: $enable_linux_affinity
|
||||||
|
hwlock: $enable_hwloc
|
||||||
|
setuid: $enable_setuid
|
||||||
|
linux delay accounting: $enable_delayacct
|
||||||
|
])
|
||||||
|
|
2
htop.c
2
htop.c
|
@ -198,7 +198,7 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
CommandLineSettings flags = parseArguments(argc, argv); // may exit()
|
CommandLineSettings flags = parseArguments(argc, argv); // may exit()
|
||||||
|
|
||||||
#ifdef HAVE_PROC
|
#ifdef HTOP_LINUX
|
||||||
if (access(PROCDIR, R_OK) != 0) {
|
if (access(PROCDIR, R_OK) != 0) {
|
||||||
fprintf(stderr, "Error: could not read procfs (compiled to look in %s).\n", PROCDIR);
|
fprintf(stderr, "Error: could not read procfs (compiled to look in %s).\n", PROCDIR);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
@ -578,7 +578,7 @@ static void LinuxProcessList_readOpenVZData(LinuxProcess* process, const char* d
|
||||||
FILE* file = fopen(filename, "r");
|
FILE* file = fopen(filename, "r");
|
||||||
if (!file)
|
if (!file)
|
||||||
return;
|
return;
|
||||||
(void) fscanf(file,
|
(void)! fscanf(file,
|
||||||
"%*32u %*32s %*1c %*32u %*32u %*32u %*32u %*32u %*32u %*32u "
|
"%*32u %*32s %*1c %*32u %*32u %*32u %*32u %*32u %*32u %*32u "
|
||||||
"%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u "
|
"%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u "
|
||||||
"%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u "
|
"%*32u %*32u %*32u %*32u %*32u %*32u %*32u %*32u "
|
||||||
|
|
Loading…
Reference in New Issue