[apparmor] [patch] parser: fix --cache-loc short arg option (-L)

Seth Arnold seth.arnold at canonical.com
Tue Feb 4 22:32:24 UTC 2014


On Tue, Feb 04, 2014 at 05:30:20PM -0500, John Johansen wrote:
> On 02/04/2014 05:04 PM, Steve Beattie wrote:
> 
> And to go along with this, lets move the short options to be right next to
> the long so its easier to update them together.

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Nice idea, if they're closer they feel more likely to be updated. :)

> Index: b/parser/parser_main.c
> ===================================================================
> --- a/parser/parser_main.c
> +++ b/parser/parser_main.c
> @@ -87,6 +87,8 @@
>  /* per-profile settings */
>  int force_complain = 0;
>  
> +/* Make sure to update BOTH the short and long_options */
> +static const char *short_options = "adf:h::rRVvI:b:BCD:NSm:qQn:XKTWkL:O:po:";
>  struct option long_options[] = {
>         {"add",                 0, 0, 'a'},
>         {"binary",              0, 0, 'B'},
> @@ -583,7 +585,7 @@
>         int count = 0;
>         option = OPTION_ADD;
>  
> -       while ((c = getopt_long(argc, argv, "adf:h::rRVvI:b:BCD:NSm:qQn:XKTWkL:O:po:", long_options, &o)) != -1)
> +       while ((c = getopt_long(argc, argv, short_options, long_options, &o)) != -1)
>         {
>                 count += process_arg(c, optarg);
>         }
> 
> 

Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140204/be292c88/attachment.pgp>


More information about the AppArmor mailing list