*** empty log message ***
This commit is contained in:
11
glibtop.h
11
glibtop.h
@@ -42,14 +42,21 @@ struct _glibtop
|
||||
int output [2]; /* Pipe client -> server */
|
||||
unsigned long os_version_code; /* Version code of the operating system */
|
||||
const char *name; /* Program name for error messages */
|
||||
const char *server_command; /* Command used to invoke server */
|
||||
const char *server_host; /* Host the server should run on */
|
||||
const char *server_user; /* Name of the user on the target host */
|
||||
const char *server_rsh; /* Command used to connect to the target host */
|
||||
unsigned long features; /* Server is required for this features */
|
||||
pid_t pid; /* PID of the server */
|
||||
};
|
||||
|
||||
extern glibtop *glibtop_global_server;
|
||||
|
||||
#define glibtop_init() glibtop_init__r(&glibtop_global_server);
|
||||
extern const unsigned long glibtop_server_features;
|
||||
|
||||
extern glibtop *glibtop_init__r __P((glibtop **));
|
||||
#define glibtop_init() glibtop_init__r(&glibtop_global_server, 0, 0);
|
||||
|
||||
extern glibtop *glibtop_init__r __P((glibtop **, const unsigned long, const unsigned));
|
||||
|
||||
#ifdef HAVE_GUILE
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
setreuid (uid, euid); setregid (gid, egid);
|
||||
|
||||
glibtop_open (&server, argv [0]);
|
||||
glibtop_open (&server, argv [0], 0, 0);
|
||||
|
||||
if (setreuid (euid, uid)) _exit (1);
|
||||
|
||||
@@ -140,11 +140,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
switch (cmnd.command) {
|
||||
case GLIBTOP_CMND_SYSDEPS:
|
||||
glibtop_get_sysdeps__r (&server, &sysdeps);
|
||||
glibtop_output (sizeof (glibtop_sysdeps), &sysdeps);
|
||||
glibtop_output (0, NULL);
|
||||
break;
|
||||
case GLIBTOP_CMND_CPU:
|
||||
#if GLIBTOP_SUID_CPU
|
||||
glibtop_get_cpu__p (&server, &data.cpu);
|
||||
@@ -207,6 +202,8 @@ int main(int argc, char *argv[])
|
||||
case GLIBTOP_CMND_PROCLIST:
|
||||
#if GLIBTOP_SUID_PROCLIST
|
||||
ptr = glibtop_get_proclist__p (&server, &data.proclist);
|
||||
#else
|
||||
ptr = NULL;
|
||||
#endif
|
||||
glibtop_output (sizeof (glibtop_proclist),
|
||||
&data.proclist);
|
||||
|
||||
Reference in New Issue
Block a user