Line 0
Link Here
|
|
|
1 |
From 5be0515dee24308fd7e270bf2e0fb5e5a7a78f32 Mon Sep 17 00:00:00 2001 |
2 |
From: Julien Cristau <jcristau@debian.org> |
3 |
Date: Thu, 9 Jun 2016 14:30:37 +0200 |
4 |
Subject: [PATCH 2/2] Fix command line parsing |
5 |
|
6 |
The gettext translation domain should be passed as .arg, not .descrip, |
7 |
otherwise popt won't process any of the command line options (it stops |
8 |
looping over the struct poptOption array when an entry has unset |
9 |
longName, shortName and arg). |
10 |
|
11 |
Signed-off-by: Julien Cristau <jcristau@debian.org> |
12 |
--- |
13 |
src/client.c | 2 +- |
14 |
src/efikeygen.c | 2 +- |
15 |
src/efisiglist.c | 2 +- |
16 |
src/pesigcheck.c | 2 +- |
17 |
4 files changed, 4 insertions(+), 4 deletions(-) |
18 |
|
19 |
diff --git a/src/client.c b/src/client.c |
20 |
index 028419f..575c873 100644 |
21 |
--- a/src/client.c |
22 |
+++ b/src/client.c |
23 |
@@ -555,7 +555,7 @@ main(int argc, char *argv[]) |
24 |
|
25 |
struct poptOption options[] = { |
26 |
{.argInfo = POPT_ARG_INTL_DOMAIN, |
27 |
- .descrip = "pesign" }, |
28 |
+ .arg = "pesign" }, |
29 |
{.longName = "token", |
30 |
.shortName = 't', |
31 |
.argInfo = POPT_ARG_STRING|POPT_ARGFLAG_SHOW_DEFAULT, |
32 |
diff --git a/src/efikeygen.c b/src/efikeygen.c |
33 |
index 6278849..8a515a5 100644 |
34 |
--- a/src/efikeygen.c |
35 |
+++ b/src/efikeygen.c |
36 |
@@ -486,7 +486,7 @@ int main(int argc, char *argv[]) |
37 |
poptContext optCon; |
38 |
struct poptOption options[] = { |
39 |
{.argInfo = POPT_ARG_INTL_DOMAIN, |
40 |
- .descrip = "pesign" }, |
41 |
+ .arg = "pesign" }, |
42 |
/* global nss-ish things */ |
43 |
{.longName = "dbdir", |
44 |
.shortName = 'd', |
45 |
diff --git a/src/efisiglist.c b/src/efisiglist.c |
46 |
index cd3f1ae..40d6a93 100644 |
47 |
--- a/src/efisiglist.c |
48 |
+++ b/src/efisiglist.c |
49 |
@@ -126,7 +126,7 @@ main(int argc, char *argv[]) |
50 |
|
51 |
struct poptOption options[] = { |
52 |
{.argInfo = POPT_ARG_INTL_DOMAIN, |
53 |
- .descrip = "pesign" }, |
54 |
+ .arg = "pesign" }, |
55 |
{.longName = "infile", |
56 |
.shortName = 'i', |
57 |
.argInfo = POPT_ARG_STRING, |
58 |
diff --git a/src/pesigcheck.c b/src/pesigcheck.c |
59 |
index 1328fe9..0d49c1a 100644 |
60 |
--- a/src/pesigcheck.c |
61 |
+++ b/src/pesigcheck.c |
62 |
@@ -214,7 +214,7 @@ main(int argc, char *argv[]) |
63 |
poptContext optCon; |
64 |
struct poptOption options[] = { |
65 |
{.argInfo = POPT_ARG_INTL_DOMAIN, |
66 |
- .descrip = "pesign" }, |
67 |
+ .arg = "pesign" }, |
68 |
{.longName = "dbfile", |
69 |
.shortName = 'D', |
70 |
.argInfo = POPT_ARG_CALLBACK|POPT_CBFLAG_POST, |
71 |
-- |
72 |
2.9.2 |
73 |
|