commit procps for openSUSE:Factory
Hello community, here is the log from the commit of package procps for openSUSE:Factory checked in at Wed Mar 11 16:42:27 CET 2009. -------- --- procps/procps.changes 2009-02-09 11:40:05.000000000 +0100 +++ procps/procps.changes 2009-03-11 15:54:17.264501899 +0100 @@ -1,0 +2,5 @@ +Wed Mar 11 15:52:42 CET 2009 - werner@suse.de + +- top: show MB in case of TB of physical memory (bnc#484271) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- procps-3.2.7-terabyte.dif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ procps.spec ++++++ --- /var/tmp/diff_new_pack.t22177/_old 2009-03-11 16:36:45.000000000 +0100 +++ /var/tmp/diff_new_pack.t22177/_new 2009-03-11 16:36:45.000000000 +0100 @@ -27,7 +27,7 @@ PreReq: %fillup_prereq %insserv_prereq AutoReqProv: on Version: 3.2.7 -Release: 150 +Release: 152 Summary: ps utilities for /proc Provides: ps Obsoletes: ps @@ -61,6 +61,7 @@ Patch24: procps-3.2.7-toosmall.dif Patch25: procps-3.2.7-cgroups_flag.diff Patch26: procps-3.2.7-pgrep_coption.dif +Patch27: procps-3.2.7-terabyte.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -116,6 +117,7 @@ %patch24 %patch25 -p1 %patch26 +%patch27 %build make CFLAGS="-Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS -pipe" \ @@ -181,6 +183,8 @@ %_mandir/man8/sysctl.8.gz %changelog +* Wed Mar 11 2009 werner@suse.de +- top: show MB in case of TB of physical memory (bnc#484271) * Mon Feb 09 2009 werner@suse.de - boot.sysctl: be more quiet (bnc#473729) * Mon Dec 15 2008 werner@suse.de ++++++ procps-3.2.7-terabyte.dif ++++++ --- top.c +++ top.c 2009-03-11 15:27:05.180786112 +0100 @@ -89,6 +89,10 @@ static int Monpidsidx = 0; static char Msg_delayed [SMLBUFSIZ]; static int Msg_awaiting = 0; + /* Show memory by default as kB */ +static int shift = 10; +#define S(X) (((unsigned long long)(X)<<10)>>shift) + // This is the select() timeout. Clear it in sig handlers to avoid a race. // (signal happens just as we are about to select() and thus does not // break us out of the select(), causing us to delay until timeout) @@ -3038,10 +3042,33 @@ skip: // Display Memory and Swap stats meminfo(); if (CHKw(Curwin, View_MEMORY) && (Screen_rows > Msg_row+3)) { - show_special(0, fmtmk(MEMORY_line1 - , kb_main_total, kb_main_used, kb_main_free, kb_main_buffers)); - show_special(0, fmtmk(MEMORY_line2 - , kb_swap_total, kb_swap_used, kb_swap_free, kb_main_cached)); + const char *line1, *line2; + if (kb_main_total > 9999999) + shift = 20; + if (kb_main_total > 9999999999) + shift = 30; + switch (shift) { + case 20: + line1 = MEMORY_line1m; + line2 = MEMORY_line2m; + break; + case 30: + line1 = MEMORY_line1g; + line2 = MEMORY_line2g; + break; + case 0: + line1 = MEMORY_line1b; + line2 = MEMORY_line2b; + break; + default: + case 10: + line1 = MEMORY_line1k; + line2 = MEMORY_line2k; + } + show_special(0, fmtmk(line1 + , S(kb_main_total), S(kb_main_used), S(kb_main_free), S(kb_main_buffers))); + show_special(0, fmtmk(line2 + , S(kb_swap_total), S(kb_swap_used), S(kb_swap_free), S(kb_main_cached))); Msg_row += 2; } --- top.h +++ top.h 2009-03-11 15:14:15.888001315 +0100 @@ -392,17 +392,29 @@ typedef struct WIN_t { " %#4.1f%% \02us,\03 %#4.1f%% \02sy,\03 %#4.1f%% \02ni,\03 %#4.1f%% \02id,\03 %#4.1f%% \02wa,\03 %#4.1f%% \02hi,\03 %#4.1f%% \02si\03\n" #define STATES_line2x7 "%s\03" \ "%#5.1f%%\02us,\03%#5.1f%%\02sy,\03%#5.1f%%\02ni,\03%#5.1f%%\02id,\03%#5.1f%%\02wa,\03%#5.1f%%\02hi,\03%#5.1f%%\02si,\03%#5.1f%%\02st\03\n" +#define MEMORY_line1b "Mem: \03" \ + " %8lub \02total,\03 %8lub \02used,\03 %8lub \02free,\03 %8lub \02buffers\03\n" +#define MEMORY_line2b "Swap:\03" \ + " %8lub \02total,\03 %8lub \02used,\03 %8lub \02free,\03 %8lub \02cached\03\n" #ifdef CASEUP_SUMMK -#define MEMORY_line1 "Mem: \03" \ +#define MEMORY_line1k "Mem: \03" \ " %8luK \02total,\03 %8luK \02used,\03 %8luK \02free,\03 %8luK \02buffers\03\n" -#define MEMORY_line2 "Swap:\03" \ +#define MEMORY_line2k "Swap:\03" \ " %8luK \02total,\03 %8luK \02used,\03 %8luK \02free,\03 %8luK \02cached\03\n" #else -#define MEMORY_line1 "Mem: \03" \ +#define MEMORY_line1k "Mem: \03" \ " %8luk \02total,\03 %8luk \02used,\03 %8luk \02free,\03 %8luk \02buffers\03\n" -#define MEMORY_line2 "Swap:\03" \ +#define MEMORY_line2k "Swap:\03" \ " %8luk \02total,\03 %8luk \02used,\03 %8luk \02free,\03 %8luk \02cached\03\n" #endif +#define MEMORY_line1m "Mem: \03" \ + " %8luM \02total,\03 %8luM \02used,\03 %8luM \02free,\03 %8luM \02buffers\03\n" +#define MEMORY_line2m "Swap:\03" \ + " %8luM \02total,\03 %8luM \02used,\03 %8luM \02free,\03 %8luM \02cached\03\n" +#define MEMORY_line1g "Mem: \03" \ + " %8luG \02total,\03 %8luG \02used,\03 %8luG \02free,\03 %8luG \02buffers\03\n" +#define MEMORY_line2g "Swap:\03" \ + " %8luG \02total,\03 %8luG \02used,\03 %8luG \02free,\03 %8luG \02cached\03\n" // Keyboard Help specially formatted string(s) -- // see 'show_special' for syntax details + other cautions. --- vmstat.c +++ vmstat.c 2009-03-11 15:43:01.476001363 +0100 @@ -164,9 +164,9 @@ static void new_header(void){ //////////////////////////////////////////////////////////////////////////// -static unsigned long unitConvert(unsigned int size){ - float cvSize; - cvSize=(float)size/dataUnit*((statMode==SLABSTAT)?1:1024); +static unsigned long unitConvert(unsigned long size){ + long double cvSize; + cvSize=(long double)size/dataUnit*((statMode==SLABSTAT)?1:1024); return ((unsigned long) cvSize); } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de