parent
73030f7346
commit
36524ac0fd
1
NEWS
1
NEWS
@ -10,6 +10,7 @@ ps: fix crash related to realloc -- thanks David Houlder
|
|||||||
ps: man page more detailed #334682
|
ps: man page more detailed #334682
|
||||||
spelling fixes #300333 #334684 #334685
|
spelling fixes #300333 #334684 #334685
|
||||||
top: crash on resize fixed -- thanks Michal Maruska #320289
|
top: crash on resize fixed -- thanks Michal Maruska #320289
|
||||||
|
vmstat: -p handles /dev/ and does not overflow #319523 #330969
|
||||||
|
|
||||||
procps-3.2.4 --> procps-3.2.5
|
procps-3.2.4 --> procps-3.2.5
|
||||||
|
|
||||||
|
10
vmstat.c
10
vmstat.c
@ -608,10 +608,12 @@ int main(int argc, char *argv[]) {
|
|||||||
case 'p':
|
case 'p':
|
||||||
statMode |= PARTITIONSTAT;
|
statMode |= PARTITIONSTAT;
|
||||||
if (argv[1]){
|
if (argv[1]){
|
||||||
++argv;
|
char *cp = *++argv;
|
||||||
sprintf(partition, "%s", *argv);
|
if(!memcmp(cp,"/dev/",5)) cp += 5;
|
||||||
}else{fprintf(stderr, "-p requires an argument\n");
|
snprintf(partition, sizeof partition, "%s", cp);
|
||||||
exit(EXIT_FAILURE);
|
}else{
|
||||||
|
fprintf(stderr, "-p requires an argument\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
|
Loading…
Reference in New Issue
Block a user