vmstat: use EXIT_FAILURE -- thanks Yoshio Nakamura #425492
This commit is contained in:
parent
e5b2b8614d
commit
805d426d07
1
NEWS
1
NEWS
@ -4,6 +4,7 @@ ps: document SCHED_BATCH and add "see also" for stime
|
|||||||
ps: man page less ambiguous
|
ps: man page less ambiguous
|
||||||
top: normal exit code should be 0 #341272 #354255
|
top: normal exit code should be 0 #341272 #354255
|
||||||
pgrep: usage error should exit with 2 #413383
|
pgrep: usage error should exit with 2 #413383
|
||||||
|
vmstat: use EXIT_FAILURE -- thanks Yoshio Nakamura #425492
|
||||||
|
|
||||||
procps-3.2.6 --> procps-3.2.7
|
procps-3.2.6 --> procps-3.2.7
|
||||||
|
|
||||||
|
4
vmstat.c
4
vmstat.c
@ -290,7 +290,7 @@ static int diskpartition_format(const char* partition_name){
|
|||||||
fDiskstat=fopen("/proc/diskstats","rb");
|
fDiskstat=fopen("/proc/diskstats","rb");
|
||||||
if(!fDiskstat){
|
if(!fDiskstat){
|
||||||
fprintf(stderr, "Your kernel doesn't support diskstat. (2.5.70 or above required)\n");
|
fprintf(stderr, "Your kernel doesn't support diskstat. (2.5.70 or above required)\n");
|
||||||
exit(0);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(fDiskstat);
|
fclose(fDiskstat);
|
||||||
@ -400,7 +400,7 @@ static void diskformat(void){
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
fprintf(stderr, "Your kernel doesn't support diskstat (2.5.70 or above required)\n");
|
fprintf(stderr, "Your kernel doesn't support diskstat (2.5.70 or above required)\n");
|
||||||
exit(0);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user