diff options
Diffstat (limited to 'patches/procps-3.2.7/generic/45_vmstat_exitcode.dpatch')
-rw-r--r-- | patches/procps-3.2.7/generic/45_vmstat_exitcode.dpatch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/patches/procps-3.2.7/generic/45_vmstat_exitcode.dpatch b/patches/procps-3.2.7/generic/45_vmstat_exitcode.dpatch new file mode 100644 index 000000000..4503d3951 --- /dev/null +++ b/patches/procps-3.2.7/generic/45_vmstat_exitcode.dpatch @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 45_vmstat_exitcode.dpatch by <gnufreedom100@gmail.com> +## +## DP: Make vmstat exit with return code of non-zero if there is a problem +@DPATCH@ +diff -ur procps-3.2.7/vmstat.c procps-FIX/vmstat.c +--- procps-3.2.7/vmstat.c 2006-06-24 23:41:48.000000000 -0700 ++++ procps-FIX/vmstat.c 2007-05-21 19:48:47.000000000 -0700 +@@ -290,7 +290,7 @@ + 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 @@ + } + }else{ + fprintf(stderr, "Your kernel doesn't support diskstat (2.5.70 or above required)\n"); +- exit(0); ++ exit(EXIT_FAILURE); + } + } + |