Copied from stub_suid.

1999-02-19  Martin Baulig  <martin@home-of-linux.org>

	* procmap.c, procargs.c, netload.c: Copied from stub_suid.

	* proclist.c, procsegment.c: Make them compile again.
This commit is contained in:
Martin Baulig
1999-02-19 21:32:52 +00:00
committed by Martin Baulig
parent 0da389347e
commit 38a4f74c1a
7 changed files with 150 additions and 5 deletions

View File

@@ -1,3 +1,9 @@
1999-02-19 Martin Baulig <martin@home-of-linux.org>
* procmap.c, procargs.c, netload.c: Copied from stub_suid.
* proclist.c, procsegment.c: Make them compile again.
1998-10-25 Martin Baulig <martin@home-of-linux.org>
* ChangeLog: New file.

View File

@@ -12,7 +12,8 @@ libgtop_sysdeps_la_LIBADD = -lmach
libgtop_sysdeps_suid_la_SOURCES = open_suid.c close_suid.c proclist.c \
procstate.c procuid.c proctime.c procmem.c \
procsignal.c prockernel.c procsegment.c
procsignal.c prockernel.c procsegment.c \
procmap.c procargs.c netload.c
libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO)
libgtop_sysdeps_suid_la_LIBADD = -lmach

View File

@@ -40,6 +40,10 @@ BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SUID_PROC_SIGNAL (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL)
#define GLIBTOP_SUID_PROC_KERNEL (1 << GLIBTOP_SYSDEPS_PROC_KERNEL)
#define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT)
#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP)
#define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS)
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
#define GLIBTOP_SUID_PPP 0
END_LIBGTOP_DECLS

43
sysdeps/osf1/netload.c Normal file
View File

@@ -0,0 +1,43 @@
/* $Id$ */
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the Gnome Top Library.
Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
The Gnome Top Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Top Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/netload.h>
static const unsigned long _glibtop_sysdeps_netload = 0;
/* Init function. */
void
glibtop_init_netload_p (glibtop *server)
{
server->sysdeps.netload = _glibtop_sysdeps_netload;
}
/* Provides Network statistics. */
void
glibtop_get_netload_p (glibtop *server, glibtop_netload *buf,
const char *interface)
{
memset (buf, 0, sizeof (glibtop_netload));
}

45
sysdeps/osf1/procargs.c Normal file
View File

@@ -0,0 +1,45 @@
/* $Id$ */
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the Gnome Top Library.
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
The Gnome Top Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Top Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/xmalloc.h>
#include <glibtop/procargs.h>
static const unsigned long _glibtop_sysdeps_proc_args = 0;
/* Init function. */
void
glibtop_init_proc_args_p (glibtop *server)
{
server->sysdeps.proc_args = _glibtop_sysdeps_proc_args;
}
/* Provides detailed information about a process. */
char *
glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf,
pid_t pid, unsigned max_len)
{
memset (buf, 0, sizeof (glibtop_proc_args));
return NULL;
}

44
sysdeps/osf1/procmap.c Normal file
View File

@@ -0,0 +1,44 @@
/* $Id$ */
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the Gnome Top Library.
Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 1998.
The Gnome Top Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Top Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/xmalloc.h>
#include <glibtop/procmap.h>
static const unsigned long _glibtop_sysdeps_proc_map = 0;
/* Init function. */
void
glibtop_init_proc_map_p (glibtop *server)
{
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
}
/* Provides detailed information about a process. */
glibtop_map_entry *
glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf, pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_map));
return NULL;
}

View File

@@ -27,8 +27,10 @@
#include <sys/user.h>
static const unsigned long _glibtop_sysdeps_proc_segment =
(1 << GLIBTOP_PROC_SEGMENT_TRS) + (1 << GLIBTOP_PROC_SEGMENT_DRS) +
(1 << GLIBTOP_PROC_SEGMENT_START_CODE) + (1 << GLIBTOP_PROC_SEGMENT_END_CODE) +
(1 << GLIBTOP_PROC_SEGMENT_TEXT_RSS) +
(1 << GLIBTOP_PROC_SEGMENT_DATA_RSS) +
(1 << GLIBTOP_PROC_SEGMENT_START_CODE) +
(1 << GLIBTOP_PROC_SEGMENT_END_CODE) +
(1 << GLIBTOP_PROC_SEGMENT_START_STACK);
/* Init function. */
@@ -69,8 +71,8 @@ glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf,
buf->end_code = (unsigned long) u.u_data_start;
buf->start_stack = (unsigned long) u.u_stack_start;
buf->trs = u.u_tsize;
buf->drs = u.u_dsize;
buf->text_rss = u.u_tsize;
buf->data_rss = u.u_dsize;
buf->flags = _glibtop_sysdeps_proc_segment;
}