Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37867064
en ru br
Репозитории ALT
S:3.3.17-alt7.g37f1060
5.1: 3.2.7-alt2
4.1: 3.2.5-alt7.M41.1
4.0: 3.2.5-alt7
3.0: 3.2.4-alt2
www.altlinux.org/Changes

Группа :: Мониторинг
Пакет: procps

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: procps-3.2.5-suse-top-cpus.patch
Скачать


diff -urk.orig procps-3.2.5.orig/top.c procps-3.2.5/top.c
--- procps-3.2.5.orig/top.c	2005-08-24 22:12:01 +0000
+++ procps-3.2.5/top.c	2005-08-24 22:16:30 +0000
@@ -2430,19 +2430,24 @@
 {
    // standardized 'secure mode' errors
    static const char err_secure[] = "\aUnavailable in secure mode";
+   static const char err_num_cpus[] = "\aSorry, terminal is not big enough";
 #ifdef WARN_NOT_SMP
    // standardized 'smp' errors
-   static const char err_smp[] = "\aSorry, only 1 cpu detected";
+   static const char err_smp[] = "\aSorry, only one cpu detected";
 #endif
 
    switch (c) {
       case '1':
+	 if ((Screen_rows < (Cpu_tot+4)) && (Cpu_tot > 1))
+		show_msg(err_num_cpus);
+	 else {
 #ifdef WARN_NOT_SMP
          if (Cpu_tot > 1) TOGw(Curwin, View_CPUSUM);
          else show_msg(err_smp);
 #else
          TOGw(Curwin, View_CPUSUM);
 #endif
+	 }
          break;
 
       case 'a':
diff -urk.orig procps-3.2.5.orig/top.h procps-3.2.5/top.h
--- procps-3.2.5.orig/top.h	2005-08-24 22:12:01 +0000
+++ procps-3.2.5/top.h	2005-08-24 22:16:30 +0000
@@ -27,7 +27,7 @@
 //#define CASEUP_SCALE    // show scaled time/num suffix upper case
 //#define CASEUP_SUMMK    // show memory summary kilobytes with 'K'
 //#define SORT_SUPRESS    // *attempt* to reduce qsort overhead
-//#define WARN_NOT_SMP    // restrict '1' & 'I' commands to true smp
+#define WARN_NOT_SMP    // restrict '1' & 'I' commands to true smp
 
 // Development/Debugging defines -----------------------------------
 //#define ATEOJ_REPORT    // report a bunch of stuff, at end-of-job
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin