~apw/procps/kernel-version-fix

« back to all changes in this revision

Viewing changes to debian/patches/top_irix.patch

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2010-06-08 11:45:44 UTC
  • mfrom: (2.1.12 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100608114544-9jyvbwg9txv7tntb
Tags: 1:3.2.8-9ubuntu1
* Merge with Debian unstable; remaining changes:
  - debian/rules (Ubuntu-specific):
    - use upstart for init script.
    - install sysctl files from new sysctl.d directory.
  - debian/sysctl.d (Ubuntu-specific):
    - 10-console-messages.conf: stop low-level kernel messages on console.
    - 10-network-security.conf: enable rp_filter and SYN-flood protection.
    - 10-keyboard.conf.powerpc: mouse button emulation on PowerPC.
    - 10-zeropage.conf: safe mmap_min_addr value for graceful fall-back.
    - README: describe how this directory is supposed to work.
  - debian/upstart, debian/postinst (Ubuntu-specific):
    - upstart configuration to replace old style sysv init script.
* Fixed upstream: debian/patches/60_linux_version_init.dpatch
* Added debian/sysctl.d/10-ptrace.conf: describe new PTRACE setting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Change formal of IRix mode when showing threads 
 
2
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
 
3
Bug-Debian: http://bugs.debian.org/459890
 
4
Reviewed-by: Craig Small <csmall@debian.org>
 
5
Index: b/top.c
 
6
===================================================================
 
7
--- a/top.c     2009-11-24 20:53:05.000000000 +1100
 
8
+++ b/top.c     2009-11-24 21:00:33.000000000 +1100
 
9
@@ -1783,7 +1783,8 @@
 
10
       confighlp(Winstk[i].rc.fieldscur);
 
11
    }
 
12
 
 
13
-   if(Rc.mode_irixps && smp_num_cpus>1){
 
14
+   if(Rc.mode_irixps && smp_num_cpus>1 &&
 
15
+      !(CHKw(Curwin, Show_THREADS))) {
 
16
       // good for 100 CPUs per process
 
17
       pcpu_max_value = 9999.0;
 
18
       Fieldstab[P_CPU].fmts = " %4.0f";
 
19
@@ -2570,6 +2571,15 @@
 
20
       case 'H':
 
21
          if (VIZCHKc) {
 
22
             TOGw(Curwin, Show_THREADS);
 
23
+            if(Rc.mode_irixps && smp_num_cpus>1 &&
 
24
+               !(CHKw(Curwin, Show_THREADS))){
 
25
+               // good for 100 CPUs per process
 
26
+               pcpu_max_value = 9999.0;
 
27
+               Fieldstab[P_CPU].fmts = " %4.0f";
 
28
+            } else {
 
29
+               pcpu_max_value = 99.9;
 
30
+               Fieldstab[P_CPU].fmts = " %#4.1f";
 
31
+            }
 
32
             show_msg(fmtmk("Show threads %s"
 
33
                , CHKw(Curwin, Show_THREADS) ? "On" : "Off"));
 
34
          }
 
35
@@ -2626,7 +2636,8 @@
 
36
          Rc.mode_irixps = !Rc.mode_irixps;
 
37
          show_msg(fmtmk("Irix mode %s", Rc.mode_irixps ? "On" : "Off"));
 
38
 #endif
 
39
-         if(Rc.mode_irixps && smp_num_cpus>1){
 
40
+         if(Rc.mode_irixps && smp_num_cpus>1 &&
 
41
+            !(CHKw(Curwin, Show_THREADS))){
 
42
             // good for 100 CPUs per process
 
43
             pcpu_max_value = 9999.0;
 
44
             Fieldstab[P_CPU].fmts = " %4.0f";