From 1ef8a7f04160675e414027f4e9fd382875edafa3 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 22 Aug 2007 14:10:46 +0000 Subject: Only open /proc/cmdline if it exists, #189686 thanks to Christian Affolter --- src/rc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3