[pacman-dev,v2,1/5] pacman-conf.c: accept short options

Message ID 20180211034118.17427-1-iff@escondida.tk
State Superseded, archived
Delegated to: Andrew Gregory
Headers show
Series [pacman-dev,v2,1/5] pacman-conf.c: accept short options | expand

Commit Message

Ivy Foster Feb. 11, 2018, 3:41 a.m. UTC
From: Ivy Foster <iff@escondida.tk>

Signed-off-by: Ivy Foster <iff@escondida.tk>
---
This verion of the patch simply drops the check for '?', since it's
caught by "default" anyway. The other patches are unchanged, except
where rebased against this modified patch.
 src/pacman/pacman-conf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/src/pacman/pacman-conf.c b/src/pacman/pacman-conf.c
index 1e6f55f9..0f81ece6 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' },
@@ -96,7 +96,6 @@  static void parse_opts(int argc, char **argv)
 				cleanup();
 				exit(0);
 				break;
-			case '?':
 			default:
 				usage(1);
 				break;