summaryrefslogtreecommitdiff
path: root/core/procps-ng/complain_unmounted_proc.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-06 00:02:44 +0000
committerroot <root@rshg054.dnsready.net>2012-05-06 00:02:44 +0000
commitf37e773fe397778858ea8d51601554863c252536 (patch)
tree9997e525a9baeb85d09bd8e0c12e750781810755 /core/procps-ng/complain_unmounted_proc.patch
parent5801c5acd80d30d17aaef76b8bc401c61b3ef3c9 (diff)
Sun May 6 00:02:43 UTC 2012
Diffstat (limited to 'core/procps-ng/complain_unmounted_proc.patch')
-rw-r--r--core/procps-ng/complain_unmounted_proc.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/procps-ng/complain_unmounted_proc.patch b/core/procps-ng/complain_unmounted_proc.patch
new file mode 100644
index 000000000..ed932dbba
--- /dev/null
+++ b/core/procps-ng/complain_unmounted_proc.patch
@@ -0,0 +1,17 @@
+Author: <hesso@hesso.pool.math.tu-berlin.de>
+Description: Complain when /proc/version cannot be found instead of
+exiting silently.
+--- a/proc/version.c
++++ b/proc/version.c
+@@ -33,8 +33,10 @@
+ char buf[256];
+ int version_string_depth;
+
+- 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);