From df8bf839ca3b7ce9a0ac6f1b645f27bdbc8509e5 Mon Sep 17 00:00:00 2001 From: David Wagner Date: Thu, 5 Dec 2013 19:07:08 +0100 Subject: remote-process: allow reading commands from stdin BZ: 154316 The remote-process utility was only able to send one command at a time. This patch adds a new usage: if the command is omitted, remote-process reads stdin and sends each line as commands. It stops whenever it encounters an error of any kind (internal or returned by the server). Example of the new usage: remote-process localhost 5000 < commands.txt Change-Id: I2478668807b5541544c5752e68e112c23c85af15 Signed-off-by: David Wagner --- remote-processor/RequestMessage.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'remote-processor') diff --git a/remote-processor/RequestMessage.h b/remote-processor/RequestMessage.h index a9567e5..763f6dc 100644 --- a/remote-processor/RequestMessage.h +++ b/remote-processor/RequestMessage.h @@ -35,6 +35,7 @@ public: CRequestMessage(); // Command Name + void setCommand(const string& strCommand); virtual const string& getCommand() const; // Arguments @@ -58,8 +59,6 @@ private: virtual void collectReceivedData(); // Size virtual uint32_t getDataSize() const; - // Command - void setCommand(const string& strCommand); // Trim input string static string trim(const string& strToTrim); -- cgit v1.1