aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rc.c b/src/rc.c
index f4613a8a..1cb899a6 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -378,7 +378,10 @@ static char *proc_getent (const char *ent)
char *p;
char *value = NULL;
int i;
-
+
+ if (! rc_exists ("/proc/cmdline"))
+ return (NULL);
+
if (! (fp = fopen ("/proc/cmdline", "r"))) {
eerror ("failed to open `/proc/cmdline': %s", strerror (errno));
return (NULL);