File procps-v3.3.3-petabytes.patch of Package procps

--- top/top.c
+++ top/top.c	2012-06-04 10:32:22.760334019 +0000
@@ -1060,15 +1060,17 @@ static int get_int (const char *prompt)
          *    SK_Kb (1) it's kilobytes
          *    SK_Mb (2) it's megabytes
          *    SK_Gb (3) it's gigabytes
-         *    SK_Tb (4) it's terabytes  */
+         *    SK_Tb (4) it's terabytes
+	 *    SK_Pb (5) it's petabytes
+	 *    SK_Eb (6) it's exabytes */
 static const char *scale_num (unsigned long num, const int width, const int type) {
       // kilobytes, megabytes, gigabytes, terabytes, duh!
    static double scale[] = { 1024.0, 1024.0*1024, 1024.0*1024*1024, 1024.0*1024*1024*1024, 0 };
       // kilo, mega, giga, tera, none
 #ifdef CASEUP_SUFIX
-   static char nextup[] =  { 'K', 'M', 'G', 'T', 0 };
+   static char nextup[] =  { 'K', 'M', 'G', 'T', 'P', 'E', 0 };
 #else
-   static char nextup[] =  { 'k', 'm', 'g', 't', 0 };
+   static char nextup[] =  { 'k', 'm', 'g', 't', 'p', 'e', 0 };
 #endif
    static char buf[SMLBUFSIZ];
    double *dp;
--- top/top.h
+++ top/top.h	2012-06-04 10:32:43.952010338 +0000
@@ -177,7 +177,7 @@ enum pflag {
         /* The scaling 'type' used with scale_num() -- this is how
            the passed number is interpreted should scaling be necessary */
 enum scale_num {
-   SK_no, SK_Kb, SK_Mb, SK_Gb, SK_Tb
+   SK_no, SK_Kb, SK_Mb, SK_Gb, SK_Tb, SK_Pb, SK_Eb
 };
 
         /* This typedef just ensures consistent 'process flags' handling */
openSUSE Build Service is sponsored by