diff --git a/NEWS b/NEWS index 1a48e70e..16b3b5eb 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ ps: document SCHED_BATCH and add "see also" for stime ps: man page less ambiguous top: normal exit code should be 0 #341272 #354255 pgrep: usage error should exit with 2 #413383 +vmstat: use EXIT_FAILURE -- thanks Yoshio Nakamura #425492 procps-3.2.6 --> procps-3.2.7 diff --git a/vmstat.c b/vmstat.c index a2d3c24b..f022928b 100644 --- a/vmstat.c +++ b/vmstat.c @@ -290,7 +290,7 @@ static int diskpartition_format(const char* partition_name){ fDiskstat=fopen("/proc/diskstats","rb"); if(!fDiskstat){ fprintf(stderr, "Your kernel doesn't support diskstat. (2.5.70 or above required)\n"); - exit(0); + exit(EXIT_FAILURE); } fclose(fDiskstat); @@ -400,7 +400,7 @@ static void diskformat(void){ } }else{ fprintf(stderr, "Your kernel doesn't support diskstat (2.5.70 or above required)\n"); - exit(0); + exit(EXIT_FAILURE); } }