summaryrefslogtreecommitdiffstats
path: root/patches/procps-3.2.8/50_top_mintime.dpatch
blob: c38f889b82dd512ec6ae16920d68c878b4d1abe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/sh /usr/share/dpatch/dpatch-run
## 50_top_mintime.dpatch by  <csmall@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Checks minimum time is valid

@DPATCH@
diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
--- procps-3.2.7~/top.c	2007-10-04 21:58:56.000000000 +1000
+++ procps-3.2.7/top.c	2007-10-04 21:59:24.000000000 +1000
@@ -2535,7 +2535,8 @@
          else {
             float tmp =
                get_float(fmtmk("Change delay from %.1f to", Rc.delay_time));
-            if (tmp > -1) Rc.delay_time = tmp;
+            if (tmp == 0.0) show_msg("\aNot valid");
+            else if (tmp > 0) Rc.delay_time = tmp;
          }
          break;