diff --git a/Makefile b/Makefile index 985ce0ae..ced7c48f 100644 --- a/Makefile +++ b/Makefile @@ -18,9 +18,9 @@ VERSION := 3 SUBVERSION := 2 -MINORVERSION := 0 -TARVERSION := 3.2.0 -LIBVERSION := 3.2.0 +MINORVERSION := 1 +TARVERSION := 3.2.1 +LIBVERSION := 3.2.1 ############ vars diff --git a/NEWS b/NEWS index 2f3eeb3c..8c8035be 100644 --- a/NEWS +++ b/NEWS @@ -1,9 +1,11 @@ procps-3.2.0 --> procps-3.2.1 -build even w/ curses in an odd location +build even w/ curses in an odd location -- thanks to Segher Boessenkool ps: STAT flags for fg process group and session leader ps: STAT flags for swapped out process dropped (was broken) ps: new -M and Z options for security data (SE Linux, etc.) +slabtop: detect broken /proc/slabinfo -- thanks to Fabian Frederick +slabtop: ensure that error messages show up on the screen -- FF again procps-3.1.15 --> procps-3.2.0 diff --git a/proc/slab.c b/proc/slab.c index 3e505d36..7c2ab0e2 100644 --- a/proc/slab.c +++ b/proc/slab.c @@ -47,6 +47,25 @@ static struct slab_info *get_slabnode(void) return node; } +/* + * slab_badname_detect - return true if current slab was declared with + * whitespaces for instance + * FIXME :Other cases ? + */ + +static int slab_badname_detect(const char *restrict buffer) +{ + int numberarea=0; + while (*buffer){ + if((*buffer)==' ') + numberarea=1; + if(isalpha(*buffer)&&numberarea) + return 1; + buffer++; + } + return 0; +} + /* * put_slabinfo - return all allocated nodes to the free list */ @@ -137,7 +156,7 @@ static int parse_slabinfo20(struct slab_info **list, struct slab_stat *stats, } if (!curr) { - fprintf(stderr, "error reading slabinfo!\n"); + fprintf(stderr, "\rerror reading slabinfo!\n"); return 1; } @@ -183,7 +202,9 @@ static int parse_slabinfo11(struct slab_info **list, struct slab_stat *stats, &curr->pages_per_slab); if (assigned < 6) { - fprintf(stderr, "unrecognizable data in slabinfo!\n"); + fprintf(stderr, "unrecognizable data in your slabinfo version 1.1\n\r"); + if(slab_badname_detect(buffer)) + fprintf(stderr, "Found an error in cache name at line %s\n", buffer); curr = NULL; break; } @@ -218,7 +239,7 @@ static int parse_slabinfo11(struct slab_info **list, struct slab_stat *stats, } if (!curr) { - fprintf(stderr, "error reading slabinfo!\n"); + fprintf(stderr, "\rerror reading slabinfo!\n"); return 1; } diff --git a/procps.lsm b/procps.lsm index 089d478f..4b447d56 100644 --- a/procps.lsm +++ b/procps.lsm @@ -1,15 +1,15 @@ Begin4 Title: procps -Version: 3.2.0 -Entered-date: 2004-1-29 +Version: 3.2.1 +Entered-date: 2004-3-26 Description: Linux system utilities Keywords: procps /proc libproc sysctl pmap ps uptime tload free w top vmstat watch skill snice kill pgrep pkill Author: Albert Cahalan, Michael K. Johnson, Jim Warner, etc. Maintained-by: various Primary-site: http://procps.sf.net/ - 242kB procps-3.2.0.tar.gz + 242kB procps-3.2.1.tar.gz Alternate-site: http://www.debian.org/Packages/unstable/base/procps.html - 242kB procps-3.2.0.tar.gz + 242kB procps-3.2.1.tar.gz Copying-policy: mixed End diff --git a/procps.spec b/procps.spec index f88b0945..662164b7 100644 --- a/procps.spec +++ b/procps.spec @@ -3,7 +3,7 @@ Summary: System and process monitoring utilities Name: procps %define major_version 3 %define minor_version 2 -%define revision 0 +%define revision 1 %define version %{major_version}.%{minor_version}.%{revision} Version: %{version} Release: 1 diff --git a/slabtop.c b/slabtop.c index 9cc2e35f..161df4f1 100644 --- a/slabtop.c +++ b/slabtop.c @@ -399,5 +399,6 @@ int main(int argc, char *argv[]) tcsetattr(0, TCSAFLUSH, &saved_tty); free_slabinfo(slab_list); + endwin(); return 0; }