time/time-fedora-ru_maxrss-is-in-kilobytes-on-Linux.patch
Dr. Werner Fink bce8f29a0e Accepting request 198137 from home:sbrabec:branches:Base:System
- Sync patches with Debian and Fedora:
  * Add man page (time.1).
  * Less nonverbose output (time-fedora-verbose.patch).
  * Fix maximal RSS report
    (time-fedora-ru_maxrss-is-in-kilobytes-on-Linux.patch,
    bnc#836049, Redhat#702826).
  * Switch to microsecond accuracy if miliseconds arithmetic rounds
    to zero
    (time-fedora-Recompute-CPU-usage-at-microsecond-level.patch,
    Redhat#527276).
  * When time exits in a non-normal way, return 128 plus the number
    of the signal which caused time to stop or abort
    (time-debian-non-normal-exit.patch).
  * struct rusage and sys/resource.h portability fix
    (time-debian-rusage-portability.patch, Debian#144819).
  * Add -q,--quiet functionality
    (time-debian-quiet.patch, Debian#56853).
  * Update bug reporting address
    (time-debian-bug-address.patch, Debian#542469).
  * Modernize the configure.in file to current autoconf style
    (time-debian-configure.patch).
  * Add a directory entry to the info page
    (time-debian-info-direntry.patch).
- Fix FSF address (time-fsf-address.patch).
- Update Summary.
- Rename time-1.7.diff to time-alpha.patch.

... And cherry pick changelog entries relevant to time.

OBS-URL: https://build.opensuse.org/request/show/198137
OBS-URL: https://build.opensuse.org/package/show/Base:System/time?expand=0&rev=3
2013-09-12 17:31:14 +00:00

33 lines
977 B
Diff

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