New upstream version 2.39.90

This commit is contained in:
Jeremy Bicha
2019-02-07 21:52:40 -05:00
133 changed files with 7365 additions and 4292 deletions

View File

@@ -8,7 +8,8 @@ libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c \
cpu.c mem.c swap.c uptime.c loadavg.c shm_limits.c msg_limits.c \
sem_limits.c procaffinity.c proclist.c procstate.c procuid.c proctime.c \
procmem.c procsignal.c prockernel.c procsegment.c procargs.c \
procmap.c netload.c ppp.c netlist.c procopenfiles.c procwd.c
procmap.c netload.c ppp.c netlist.c procopenfiles.c procwd.c \
procio.c
libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h
libgtopincludedir = $(includedir)/libgtop-2.0

View File

@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -124,7 +124,7 @@ am_libgtop_sysdeps_suid_2_0_la_OBJECTS = open.lo close.lo cpu.lo \
msg_limits.lo sem_limits.lo procaffinity.lo proclist.lo \
procstate.lo procuid.lo proctime.lo procmem.lo procsignal.lo \
prockernel.lo procsegment.lo procargs.lo procmap.lo netload.lo \
ppp.lo netlist.lo procopenfiles.lo procwd.lo
ppp.lo netlist.lo procopenfiles.lo procwd.lo procio.lo
libgtop_sysdeps_suid_2_0_la_OBJECTS = \
$(am_libgtop_sysdeps_suid_2_0_la_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
@@ -141,7 +141,22 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/close.Plo ./$(DEPDIR)/cpu.Plo \
./$(DEPDIR)/loadavg.Plo ./$(DEPDIR)/mem.Plo \
./$(DEPDIR)/msg_limits.Plo ./$(DEPDIR)/netlist.Plo \
./$(DEPDIR)/netload.Plo ./$(DEPDIR)/nosuid.Plo \
./$(DEPDIR)/open.Plo ./$(DEPDIR)/ppp.Plo \
./$(DEPDIR)/procaffinity.Plo ./$(DEPDIR)/procargs.Plo \
./$(DEPDIR)/procio.Plo ./$(DEPDIR)/prockernel.Plo \
./$(DEPDIR)/proclist.Plo ./$(DEPDIR)/procmap.Plo \
./$(DEPDIR)/procmem.Plo ./$(DEPDIR)/procopenfiles.Plo \
./$(DEPDIR)/procsegment.Plo ./$(DEPDIR)/procsignal.Plo \
./$(DEPDIR)/procstate.Plo ./$(DEPDIR)/proctime.Plo \
./$(DEPDIR)/procuid.Plo ./$(DEPDIR)/procwd.Plo \
./$(DEPDIR)/sem_limits.Plo ./$(DEPDIR)/shm_limits.Plo \
./$(DEPDIR)/siglist.Plo ./$(DEPDIR)/swap.Plo \
./$(DEPDIR)/sysinfo.Plo ./$(DEPDIR)/uptime.Plo
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -412,7 +427,8 @@ libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c \
cpu.c mem.c swap.c uptime.c loadavg.c shm_limits.c msg_limits.c \
sem_limits.c procaffinity.c proclist.c procstate.c procuid.c proctime.c \
procmem.c procsignal.c prockernel.c procsegment.c procargs.c \
procmap.c netload.c ppp.c netlist.c procopenfiles.c procwd.c
procmap.c netload.c ppp.c netlist.c procopenfiles.c procwd.c \
procio.c
libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h
libgtopincludedir = $(includedir)/libgtop-2.0
@@ -438,8 +454,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -474,35 +490,42 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadavg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_limits.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlist.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netload.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nosuid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procaffinity.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procargs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prockernel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proclist.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procmap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procmem.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procopenfiles.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procsegment.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procsignal.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procstate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proctime.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procuid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procwd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sem_limits.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shm_limits.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siglist.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysinfo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uptime.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadavg.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_limits.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlist.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netload.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nosuid.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppp.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procaffinity.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procargs.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procio.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prockernel.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proclist.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procmap.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procmem.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procopenfiles.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procsegment.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procsignal.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procstate.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proctime.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procuid.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procwd.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sem_limits.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shm_limits.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siglist.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysinfo.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uptime.Plo@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
am--depfiles: $(am__depfiles_remade)
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -604,7 +627,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -677,7 +703,36 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f ./$(DEPDIR)/close.Plo
-rm -f ./$(DEPDIR)/cpu.Plo
-rm -f ./$(DEPDIR)/loadavg.Plo
-rm -f ./$(DEPDIR)/mem.Plo
-rm -f ./$(DEPDIR)/msg_limits.Plo
-rm -f ./$(DEPDIR)/netlist.Plo
-rm -f ./$(DEPDIR)/netload.Plo
-rm -f ./$(DEPDIR)/nosuid.Plo
-rm -f ./$(DEPDIR)/open.Plo
-rm -f ./$(DEPDIR)/ppp.Plo
-rm -f ./$(DEPDIR)/procaffinity.Plo
-rm -f ./$(DEPDIR)/procargs.Plo
-rm -f ./$(DEPDIR)/procio.Plo
-rm -f ./$(DEPDIR)/prockernel.Plo
-rm -f ./$(DEPDIR)/proclist.Plo
-rm -f ./$(DEPDIR)/procmap.Plo
-rm -f ./$(DEPDIR)/procmem.Plo
-rm -f ./$(DEPDIR)/procopenfiles.Plo
-rm -f ./$(DEPDIR)/procsegment.Plo
-rm -f ./$(DEPDIR)/procsignal.Plo
-rm -f ./$(DEPDIR)/procstate.Plo
-rm -f ./$(DEPDIR)/proctime.Plo
-rm -f ./$(DEPDIR)/procuid.Plo
-rm -f ./$(DEPDIR)/procwd.Plo
-rm -f ./$(DEPDIR)/sem_limits.Plo
-rm -f ./$(DEPDIR)/shm_limits.Plo
-rm -f ./$(DEPDIR)/siglist.Plo
-rm -f ./$(DEPDIR)/swap.Plo
-rm -f ./$(DEPDIR)/sysinfo.Plo
-rm -f ./$(DEPDIR)/uptime.Plo
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -723,7 +778,36 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f ./$(DEPDIR)/close.Plo
-rm -f ./$(DEPDIR)/cpu.Plo
-rm -f ./$(DEPDIR)/loadavg.Plo
-rm -f ./$(DEPDIR)/mem.Plo
-rm -f ./$(DEPDIR)/msg_limits.Plo
-rm -f ./$(DEPDIR)/netlist.Plo
-rm -f ./$(DEPDIR)/netload.Plo
-rm -f ./$(DEPDIR)/nosuid.Plo
-rm -f ./$(DEPDIR)/open.Plo
-rm -f ./$(DEPDIR)/ppp.Plo
-rm -f ./$(DEPDIR)/procaffinity.Plo
-rm -f ./$(DEPDIR)/procargs.Plo
-rm -f ./$(DEPDIR)/procio.Plo
-rm -f ./$(DEPDIR)/prockernel.Plo
-rm -f ./$(DEPDIR)/proclist.Plo
-rm -f ./$(DEPDIR)/procmap.Plo
-rm -f ./$(DEPDIR)/procmem.Plo
-rm -f ./$(DEPDIR)/procopenfiles.Plo
-rm -f ./$(DEPDIR)/procsegment.Plo
-rm -f ./$(DEPDIR)/procsignal.Plo
-rm -f ./$(DEPDIR)/procstate.Plo
-rm -f ./$(DEPDIR)/proctime.Plo
-rm -f ./$(DEPDIR)/procuid.Plo
-rm -f ./$(DEPDIR)/procwd.Plo
-rm -f ./$(DEPDIR)/sem_limits.Plo
-rm -f ./$(DEPDIR)/shm_limits.Plo
-rm -f ./$(DEPDIR)/siglist.Plo
-rm -f ./$(DEPDIR)/swap.Plo
-rm -f ./$(DEPDIR)/sysinfo.Plo
-rm -f ./$(DEPDIR)/uptime.Plo
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -744,20 +828,20 @@ uninstall-am: uninstall-libgtopincludeHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-libgtopincludeHEADERS install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
uninstall-libgtopincludeHEADERS
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
clean-generic clean-libtool clean-noinstLTLIBRARIES \
cscopelist-am ctags ctags-am distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-libgtopincludeHEADERS \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-libgtopincludeHEADERS
.PRECIOUS: Makefile

View File

@@ -45,6 +45,8 @@ G_BEGIN_DECLS
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
#define GLIBTOP_SUID_PROC_WD (1 << GLIBTOP_SYSDEPS_PROC_WD)
#define GLIBTOP_SUID_PROC_AFFINITY 0
#define GLIBTOP_SUID_PROC_IO 0
#define GLIBTOP_SUID_PROC_OPEN_FILES 0
G_END_DECLS

44
sysdeps/darwin/procio.c Normal file
View File

@@ -0,0 +1,44 @@
/* Copyright (C) 2018 Benoît Dejean
This file is part of LibGTop.
Contributed by Benoît Dejean <bdejean@gmail.com>, February 2018.
LibGTop is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
LibGTop is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with LibGTop; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include <config.h>
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/procio.h>
static const unsigned long _glibtop_sysdeps_proc_io;
/* Init function. */
void
_glibtop_init_proc_io_s (glibtop *server)
{
server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
}
/* Provides detailed information about a process. */
void
glibtop_get_proc_io_s (glibtop *server, glibtop_proc_io *buf, pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_io));
buf->flags = _glibtop_sysdeps_proc_io;
}