Blame SOURCES/time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch

abc9d8
From ad24a929bdcc15abae14a64ea21b821bcd8cb030 Mon Sep 17 00:00:00 2001
abc9d8
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
abc9d8
Date: Wed, 11 May 2011 15:19:11 +0200
abc9d8
Subject: [PATCH] ru_maxrss is in kilobytes on Linux
abc9d8
abc9d8
Since 2.6.32 Linux returns ru_maxrss in kilobytes. Not in pages.
abc9d8
abc9d8
See http://lists.gnu.org/archive/html/bug-gnu-utils/2008-12/msg00047.html
abc9d8
for discussion.
abc9d8
---
abc9d8
 time.c |    4 ++++
abc9d8
 1 files changed, 4 insertions(+), 0 deletions(-)
abc9d8
abc9d8
diff --git a/time.c b/time.c
abc9d8
index d15fee4..43aec0b 100644
abc9d8
--- a/time.c
abc9d8
+++ b/time.c
abc9d8
@@ -395,7 +395,11 @@ summarize (fp, fmt, command, resp)
abc9d8
 		       ptok ((UL) resp->ru.ru_ixrss) / MSEC_TO_TICKS (v));
abc9d8
 	      break;
abc9d8
 	    case 'M':		/* Maximum resident set size.  */
abc9d8
+#ifdef __linux__
abc9d8
+	      fprintf (fp, "%ld", resp->ru.ru_maxrss);
abc9d8
+#else
abc9d8
 	      fprintf (fp, "%lu", ptok ((UL) resp->ru.ru_maxrss));
abc9d8
+#endif
abc9d8
 	      break;
abc9d8
 	    case 'O':		/* Outputs.  */
abc9d8
 	      fprintf (fp, "%ld", resp->ru.ru_oublock);
abc9d8
-- 
abc9d8
1.7.4.4
abc9d8