Fabian fixes slabtop; prep for 3.2.1 release

This commit is contained in:
albert 2004-03-27 04:30:05 +00:00
parent 3f49530d77
commit a3dad291bb
6 changed files with 36 additions and 12 deletions

View File

@ -18,9 +18,9 @@
VERSION := 3 VERSION := 3
SUBVERSION := 2 SUBVERSION := 2
MINORVERSION := 0 MINORVERSION := 1
TARVERSION := 3.2.0 TARVERSION := 3.2.1
LIBVERSION := 3.2.0 LIBVERSION := 3.2.1
############ vars ############ vars

4
NEWS
View File

@ -1,9 +1,11 @@
procps-3.2.0 --> procps-3.2.1 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 fg process group and session leader
ps: STAT flags for swapped out process dropped (was broken) ps: STAT flags for swapped out process dropped (was broken)
ps: new -M and Z options for security data (SE Linux, etc.) 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 procps-3.1.15 --> procps-3.2.0

View File

@ -47,6 +47,25 @@ static struct slab_info *get_slabnode(void)
return node; 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 * 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) { if (!curr) {
fprintf(stderr, "error reading slabinfo!\n"); fprintf(stderr, "\rerror reading slabinfo!\n");
return 1; return 1;
} }
@ -183,7 +202,9 @@ static int parse_slabinfo11(struct slab_info **list, struct slab_stat *stats,
&curr->pages_per_slab); &curr->pages_per_slab);
if (assigned < 6) { 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; curr = NULL;
break; break;
} }
@ -218,7 +239,7 @@ static int parse_slabinfo11(struct slab_info **list, struct slab_stat *stats,
} }
if (!curr) { if (!curr) {
fprintf(stderr, "error reading slabinfo!\n"); fprintf(stderr, "\rerror reading slabinfo!\n");
return 1; return 1;
} }

View File

@ -1,15 +1,15 @@
Begin4 Begin4
Title: procps Title: procps
Version: 3.2.0 Version: 3.2.1
Entered-date: 2004-1-29 Entered-date: 2004-3-26
Description: Linux system utilities Description: Linux system utilities
Keywords: procps /proc libproc sysctl pmap ps uptime tload Keywords: procps /proc libproc sysctl pmap ps uptime tload
free w top vmstat watch skill snice kill pgrep pkill free w top vmstat watch skill snice kill pgrep pkill
Author: Albert Cahalan, Michael K. Johnson, Jim Warner, etc. Author: Albert Cahalan, Michael K. Johnson, Jim Warner, etc.
Maintained-by: various <procps-feedback@lists.sf.net> Maintained-by: various <procps-feedback@lists.sf.net>
Primary-site: http://procps.sf.net/ 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 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 Copying-policy: mixed
End End

View File

@ -3,7 +3,7 @@ Summary: System and process monitoring utilities
Name: procps Name: procps
%define major_version 3 %define major_version 3
%define minor_version 2 %define minor_version 2
%define revision 0 %define revision 1
%define version %{major_version}.%{minor_version}.%{revision} %define version %{major_version}.%{minor_version}.%{revision}
Version: %{version} Version: %{version}
Release: 1 Release: 1

View File

@ -399,5 +399,6 @@ int main(int argc, char *argv[])
tcsetattr(0, TCSAFLUSH, &saved_tty); tcsetattr(0, TCSAFLUSH, &saved_tty);
free_slabinfo(slab_list); free_slabinfo(slab_list);
endwin();
return 0; return 0;
} }