chiark / gitweb /
rfreezefs.c: Fix the help message, which was egregiously wrong.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 16 Jul 2013 17:26:13 +0000 (18:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 16 Jul 2013 17:26:48 +0000 (18:26 +0100)
rfreezefs.c

index ccc61cd40a20c2e57c7f320beb60c757b968cb3f..f846f25456494c9a4d932a60476ae2fafe43871a 100644 (file)
@@ -303,17 +303,31 @@ static void help(FILE *fp)
   fputs("\n\
 Freezes a filesystem temporarily, with some measure of safety.\n\
 \n\
-The program listens for connections on a TCP port, and prints a line\n\
+The program listens for connections on a TCP port, and prints a number of\n\
+lines:\n\
 \n\
-       PORT COOKIE\n\
+       PORT <port>\n\
+       TOKEN FREEZE <token>\n\
+       TOKEN FROZEN <token>\n\
+       TOKEN KEEPALIVE <token>\n\
+       TOKEN THAW <token>\n\
+       TOKEN THAWED <token>\n\
+       READY\n\
 \n\
-to standard output.  You must connect to this PORT and send the COOKIE\n\
-followed by a newline within a short period of time.  The filesystems\n\
-will then be frozen, and `OK' written to the connection.  In order to\n\
-keep the file system frozen, you must keep the connection open, and\n\
-feed data into it.  If the connection closes, or no data is received\n\
-within a set period of time, or the program receives one of a variety\n\
-of signals or otherwise becomes unhappy, the filesystems are thawed again.\n\
+to standard output.  You must connect to the <port>, using TCP, and send\n\
+the FREEZE token followed by a newline within a short period of time.  The\n\
+filesystems will then be frozen, and the FROZEN token written to the\n\
+connection.  In order to keep the file system frozen, you must keep the\n\
+connection open, and periodically echo the KEEPALIVE token to it.  To\n\
+release the filesystems, write the THAW token to the connection, followed\n\
+by a newline; the filesystem will be thawed, and the THAWED token echoed\n\
+back.  If the connection closes, or no valid message is received within a\n\
+set period of time, or the program receives one of a variety of signals or\n\
+otherwise becomes unhappy, the filesystems are thawed again.\n\
+\n\
+The program exits with status zero if everything worked as planned, while\n\
+nonzero codes indicate failures of various kinds (see the manual); an exit\n\
+status of 112 means that thawing a filesystem failed.\n\
 \n\
 Options:\n\
 \n\