From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 87FA05A0271; Sun, 4 Jun 2023 07:50:01 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH] conf, log: On -h / --help, print usage to stdout, not stderr Date: Sun, 4 Jun 2023 07:50:01 +0200 Message-Id: <20230604055001.619958-1-sbrivio@redhat.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Message-ID-Hash: ONP34ITOJCS4APCOE7KXBPIGQHNXAUWS X-Message-ID-Hash: ONP34ITOJCS4APCOE7KXBPIGQHNXAUWS X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: =?UTF-8?q?Erik=20Sj=C3=B6lund?= X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: RXJpayBzdWdnZXN0cyB0aGF0IHRoaXMgbWFrZXMgaXQgZWFzaWVyIHRvIGdyZXAgZm9yIG9wdGlv bnMsIGFuZCB3aXRoDQotLWhlbHAgd2UncmUgYW55d2F5IHByaW50aW5nIHVzYWdlIGluZm9ybWF0 aW9uIGFzIGV4cGVjdGVkLCBub3QgYXMNCnBhcnQgb2YgYW4gZXJyb3IgcmVwb3J0Lg0KDQpSZXBv cnRlZC1ieTogRXJpayBTasO2bHVuZCA8ZXJpay5zam9sdW5kQGdtYWlsLmNvbT4NCkxpbms6IGh0 dHBzOi8vYnVncy5wYXNzdC50b3Avc2hvd19idWcuY2dpP2lkPTUyDQpTaWduZWQtb2ZmLWJ5OiBT dGVmYW5vIEJyaXZpbyA8c2JyaXZpb0ByZWRoYXQuY29tPg0KLS0tDQogY29uZi5jI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