summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6aec896)
raw | patch | inline | side by side (parent: 6aec896)
author | Florian Forster <octo@huhu.verplant.org> | |
Wed, 20 Jan 2010 16:42:52 +0000 (17:42 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 20 Jan 2010 16:42:52 +0000 (17:42 +0100) |
src/swap.c | patch | blob | history |
diff --git a/src/swap.c b/src/swap.c
index 63a5c89d24062745902dab9b7fadc0863ef15c01..78bf87a38c99fd25469d9e775f4a2d0f495726e6 100644 (file)
--- a/src/swap.c
+++ b/src/swap.c
#elif HAVE_PERFSTAT
static int pagesize;
static perfstat_memory_total_t pmemory;
-/*# endif HAVE_PERFSTAT */
+/*# endif HAVE_PERFSTAT */
#else
# error "No applicable input method."
old_kernel = 1;
}
- if ( old_kernel )
+ if ( old_kernel )
while (fgets (buffer, 1024, fh) != NULL)
{
- if (strncasecmp (buffer, "page",4) == 0)
+ if (strncasecmp (buffer, "page",4) == 0)
{
numfields = strsplit(buffer,fields,3);
if ( numfields < 3 )
swap_out = (derive_t) atoll(fields[2]);
}
}
- else
+ else
while (fgets (buffer, 1024, fh) != NULL)
{
derive_t *val = NULL;
val = &swap_out;
else
continue;
-
+
numfields = strsplit (buffer, fields, 8);
if (numfields < 2)
* However, Solaris does not allow to allocated/reserved more than the
* available swap (physical memory + disk swap), so the pedant may
* prefer: allocated + unallocated = reserved, available
- *
+ *
* We map the above to: used + resv = n/a, free
*
* Does your brain hurt yet? - Christophe Kalt