diff options
Diffstat (limited to 'core/procps-ng/complain_unmounted_proc.patch')
-rw-r--r-- | core/procps-ng/complain_unmounted_proc.patch | 17 |
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); |