summaryrefslogtreecommitdiffstats
path: root/patches/procps-3.2.7/generic/45_proc_complain_unmounted_proc.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/procps-3.2.7/generic/45_proc_complain_unmounted_proc.dpatch')
-rw-r--r--patches/procps-3.2.7/generic/45_proc_complain_unmounted_proc.dpatch21
1 files changed, 21 insertions, 0 deletions
diff --git a/patches/procps-3.2.7/generic/45_proc_complain_unmounted_proc.dpatch b/patches/procps-3.2.7/generic/45_proc_complain_unmounted_proc.dpatch
new file mode 100644
index 000000000..c34e618b4
--- /dev/null
+++ b/patches/procps-3.2.7/generic/45_proc_complain_unmounted_proc.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 45_proc_complain_unmounted_proc.dpatch by <hesso@hesso.pool.math.tu-berlin.de>
+##
+## DP: Complain when /proc/version cannot be found instead of
+## DP: exiting silently.
+
+@DPATCH@
+--- procps-3.2.7/proc/version.cO 2007-08-06 16:18:41.000000000 +0200
++++ procps-3.2.7/proc/version.c 2007-08-06 16:19:28.000000000 +0200
+@@ -39,8 +39,10 @@
+ FILE *fp;
+ char buf[256];
+
+- if ( (fp=fopen("/proc/version","r")) == NULL) /* failure implies impending death */
++ if ( (fp=fopen("/proc/version","r")) == NULL) {
++ fprintf(stderr, "Cannot find /proc/version - is /proc mounted?\n");
+ exit(1);
++ }
+ if (fgets(buf, 256, fp) == NULL) {
+ fprintf(stderr, "Cannot read kernel version from /proc/version\n");
+ fclose(fp);