summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralbert <>2007-05-28 00:20:13 +0000
committeralbert <>2007-05-28 00:20:13 +0000
commit805d426d078c45f36239c3692a42f220375c5f18 (patch)
treec0ae896c2c08b59a190dd2603ab70039d4f0d25e
parente5b2b8614d00bd776f6eec29e9d7e24308b50953 (diff)
downloadprocps-ng-805d426d078c45f36239c3692a42f220375c5f18.tar.gz
vmstat: use EXIT_FAILURE -- thanks Yoshio Nakamura #425492
-rw-r--r--NEWS1
-rw-r--r--vmstat.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 1a48e70..16b3b5e 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 a2d3c24..f022928 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);
}
}