From b484b1dca888b8515cde136aea77c228b08f4593 Mon Sep 17 00:00:00 2001 From: Matt Panaro Date: Wed, 26 Jul 2023 16:45:57 -0400 Subject: [PATCH] fix missing -F short-option for certfile in commit 1b8615, the `-F` short-option was accidentally refactored out of the codebase, so that only the long-option for `-certfile` would work. This commit restores the `-F` short-option, as well as conditionally populating the `short_opts` string based on compilation-options for `NETLINK` and `GNUTLS` --- nbd-client.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nbd-client.c b/nbd-client.c index dae46366..ac0419dc 100644 --- a/nbd-client.c +++ b/nbd-client.c @@ -896,11 +896,14 @@ void disconnect(char* device) { close(nbd); } +static const char *short_opts = "-B:b:c:d:gH:hlnN:PpRSst:uVx" #if HAVE_NETLINK -static const char *short_opts = "-A:B:b:c:C:d:gH:hK:LlnN:PpRSst:uVx"; -#else -static const char *short_opts = "-A:B:b:c:C:d:gH:hK:lnN:PpRSst:uVx"; + "L" +#endif +#if HAVE_GNUTLS + "A:C:F:K:" #endif + ; int main(int argc, char *argv[]) { char* port=NBD_DEFAULT_PORT;