client: Don't print the same error message twice.
authorAndre Noll <maan@systemlinux.org>
Mon, 23 Jul 2012 17:03:48 +0000 (19:03 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 10 Feb 2013 14:27:53 +0000 (15:27 +0100)
Currently, if the client task exits, the corresponding error
message is printed both by client_post_select() and by main()
of client.c.

This patch makes main() print a generic "command failed" error
message instead.

client.c

index 8e3e021..f890257 100644 (file)
--- a/client.c
+++ b/client.c
@@ -612,7 +612,7 @@ int main(int argc, char *argv[])
                case -E_BTR_EOF:
                        ret = 0;
                        break;
-               default: ret = ct->task.error;
+               default: ret = -E_SERVER_CMD_FAILURE;
                }
        }
 out: