psplash: Allow newline terminated commands as well as null terminated ones through...
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Aug 2008 15:36:06 +0000 (15:36 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Aug 2008 15:36:06 +0000 (15:36 +0000)
ChangeLog
psplash.c

index 4af9399..35c3fb7 100644 (file)
--- 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:
index 2a7ae38..d5aed0d 100644 (file)
--- 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];