aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2008-08-12 15:36:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2008-08-12 15:36:06 +0000
commit10e817f35215d7999d6da401610e7b582d509f35 (patch)
tree97e497769b1a51a7f01488c5f64d6d1279f698ce
parent876d255b86451c33844d2bd390be1ef4573b173d (diff)
downloadpsplash-10e817f35215d7999d6da401610e7b582d509f35.tar.gz
psplash-10e817f35215d7999d6da401610e7b582d509f35.tar.bz2
psplash-10e817f35215d7999d6da401610e7b582d509f35.zip
psplash: Allow newline terminated commands as well as null terminated ones through the fifo.
-rw-r--r--ChangeLog6
-rw-r--r--psplash.c9
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4af9399..35c3fb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-12 Richard Purdie <rpurdie@openedhand.com>
+
+ * psplash.c:
+ Allow newline terminated commands as well as null terminated ones
+ through the fifo.
+
2008-05-27 Robert Bragg <bob@openedhand.com>
* psplash-fb.c:
diff --git a/psplash.c b/psplash.c
index 2a7ae38..d5aed0d 100644
--- a/psplash.c
+++ b/psplash.c
@@ -175,6 +175,15 @@ psplash_main (PSplashFB *fb, int pipe_fd, int timeout)
return;
length = 0;
}
+ else if (command[length-1] == '\n')
+ {
+ command[length-1] = '\0';
+ if (parse_command(fb, command, strlen(command)))
+ return;
+ length = 0;
+ }
+
+
out:
end = &command[length];