Reverted some stuff from 06-07-1998 since it was too buggy.

1998-06-18  Martin Baulig  <baulig@taurus.uni-trier.de>

	* sysdeps/linux/*.c: Reverted some stuff from 06-07-1998
	since it was too buggy.
This commit is contained in:
Martin Baulig
1998-06-18 19:02:49 +00:00
committed by Martin Baulig
parent 3fcc477b25
commit 1b90ed4fcc
11 changed files with 117 additions and 280 deletions

View File

@@ -45,17 +45,10 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
buf->flags = _glibtop_sysdeps_mem;
#ifdef GLIBTOP_CACHE_OPEN
fd = server->machine.fd_meminfo;
#endif
if (fd == 0) {
fd = open (FILENAME, O_RDONLY);
if (fd == -1)
glibtop_error_r (server, "open (%s): %s",
FILENAME, strerror (errno));
} else {
lseek (fd, 0, SEEK_SET);
}
fd = open (FILENAME, O_RDONLY);
if (fd == -1)
glibtop_error_r (server, "open (%s): %s",
FILENAME, strerror (errno));
ret = read (fd, buffer, BUFSIZ);
if (ret == -1)
@@ -75,9 +68,5 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
buf->user = buf->total - buf->free - buf->shared - buf->buffer;
#ifdef GLIBTOP_CACHE_OPEN
server->machine.fd_meminfo = fd;
#else
close (fd);
#endif
}