Only open /proc/cmdline if it exists, #189686 thanks to Christian Affolter
This commit is contained in:
parent
25d46c0e96
commit
1ef8a7f041
@ -1,6 +1,10 @@
|
|||||||
# ChangeLog for Gentoo System Intialization ("rc") scripts
|
# ChangeLog for Gentoo System Intialization ("rc") scripts
|
||||||
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
|
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
|
||||||
|
|
||||||
|
22 Aug 2007; Roy Marples <uberlord@gentoo.org>:
|
||||||
|
|
||||||
|
Only open /proc/cmdline if it exists, #189686 thanks to Christian Affolter
|
||||||
|
|
||||||
21 Aug 2007; Roy Marples <uberlord@gentoo.org>:
|
21 Aug 2007; Roy Marples <uberlord@gentoo.org>:
|
||||||
|
|
||||||
Fix pppd getting the interface metric.
|
Fix pppd getting the interface metric.
|
||||||
|
5
src/rc.c
5
src/rc.c
@ -378,7 +378,10 @@ static char *proc_getent (const char *ent)
|
|||||||
char *p;
|
char *p;
|
||||||
char *value = NULL;
|
char *value = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (! rc_exists ("/proc/cmdline"))
|
||||||
|
return (NULL);
|
||||||
|
|
||||||
if (! (fp = fopen ("/proc/cmdline", "r"))) {
|
if (! (fp = fopen ("/proc/cmdline", "r"))) {
|
||||||
eerror ("failed to open `/proc/cmdline': %s", strerror (errno));
|
eerror ("failed to open `/proc/cmdline': %s", strerror (errno));
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user