[PATCH] [main,client] Open /proc/cmdline by absolute path
Colin Watson
cjwatson at ubuntu.com
Mon Sep 6 09:23:52 PDT 2010
Open /proc/cmdline, not proc/cmdline. (Technically this doesn't matter
in the daemon, since it's already done chdir ("/"), but the client does
need this and it's clearer to have them match.)
---
src/client/plymouth.c | 2 +-
src/main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/client/plymouth.c b/src/client/plymouth.c
index 28ec6bb..552c36a 100644
--- a/src/client/plymouth.c
+++ b/src/client/plymouth.c
@@ -742,7 +742,7 @@ get_kernel_command_line (state_t *state)
int fd;
ply_trace ("opening /proc/cmdline");
- fd = open ("proc/cmdline", O_RDONLY);
+ fd = open ("/proc/cmdline", O_RDONLY);
if (fd < 0)
{
diff --git a/src/main.c b/src/main.c
index 533bf42..9a669bd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1609,7 +1609,7 @@ get_kernel_command_line (state_t *state)
char *key;
ply_trace ("opening /proc/cmdline");
- fd = open ("proc/cmdline", O_RDONLY);
+ fd = open ("/proc/cmdline", O_RDONLY);
if (fd < 0)
{
--
1.7.1
More information about the plymouth
mailing list