[pacman-dev] [PATCH v3 1/5] pacman-conf.c: accept short options

iff at escondida.tk iff at escondida.tk
Sun Feb 11 04:15:09 UTC 2018


From: Ivy Foster <iff at escondida.tk>

Signed-off-by: Ivy Foster <iff at escondida.tk>
---
As per agregory's request in #archlinux-pacman, this version of the
patch leaves the check for '?' well enough alone. '?' is
getopt_long(3)'s way of indicating user error, and we can think of
default: as indicating options forgotten in development.

 src/pacman/pacman-conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pacman/pacman-conf.c b/src/pacman/pacman-conf.c
index 1e6f55f9..3c9a80e2 100644
--- a/src/pacman/pacman-conf.c
+++ b/src/pacman/pacman-conf.c
@@ -59,7 +59,7 @@ static void parse_opts(int argc, char **argv)
 	int c;
 	config_file = CONFFILE;
 
-	const char *short_opts = "";
+	const char *short_opts = "c:hlR:r:Vv";
 	struct option long_opts[] = {
 		{ "config"    , required_argument , NULL , 'c' },
 		{ "rootdir"   , required_argument , NULL , 'R' },
-- 
2.16.1


More information about the pacman-dev mailing list