Package: procps Version: 1:3.2.7-3 Severity: normal Tags: patch
procps: vmstat should return EXIT_FAILURE as return code in two cases instead of '0' patch included. -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-4-k7 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages procps depends on: ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries ii libncurses5 5.5-5 Shared libraries for terminal hand ii lsb-base 3.1-23.1 Linux Standard Base 3.1 init scrip Versions of packages procps recommends: ii psmisc 22.3-1 Utilities that use the proc filesy -- no debconf information
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); } }