[libvirt] [PATCH 1/4] virt-aa-helper: clarify command line options

Jamie Strandboge jamie at canonical.com
Tue Nov 19 20:34:33 UTC 2019


On Wed, 16 Oct 2019, Christian Ehrhardt wrote:

> While only used internally from libvirt the options still are misleading
> enough to cause issues every now and then.
> Group modes, options and an adding extra file and extend the wording of
> the latter which had the biggest lack of clarity.
> Both add a file to the end of the rules, but one re-generates the
> rules from XML and the other keeps the existing rules as-is not
> considering the XML content.
> 
> Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
> ---
>  src/security/virt-aa-helper.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
> index 9157411133..e0c72e1b9c 100644
> --- a/src/security/virt-aa-helper.c
> +++ b/src/security/virt-aa-helper.c
> @@ -95,18 +95,20 @@ vahDeinit(vahControl * ctl)
>  static void
>  vah_usage(void)
>  {
> -    printf(_("\n%s [options] [< def.xml]\n\n"
> -            "  Options:\n"
> +    printf(_("\n%s mode [options] [extra file] [< def.xml]\n\n"
> +            "  Modes:\n"
>              "    -a | --add                     load profile\n"
>              "    -c | --create                  create profile from template\n"
> -            "    -d | --dryrun                  dry run\n"
>              "    -D | --delete                  unload and delete profile\n"
> -            "    -f | --add-file <file>         add file to profile\n"
> -            "    -F | --append-file <file>      append file to profile\n"
>              "    -r | --replace                 reload profile\n"
>              "    -R | --remove                  unload profile\n"
> -            "    -h | --help                    this help\n"
> +            "  Options:\n"
> +            "    -d | --dryrun                  dry run\n"
>              "    -u | --uuid <uuid>             uuid (profile name)\n"
> +            "    -h | --help                    this help\n"
> +            "  Extra File:\n"
> +            "    -f | --add-file <file>         add file to a profile generated from XML\n"
> +            "    -F | --append-file <file>      append file to an existing profile\n"
>              "\n"), progname);
>  
>      puts(_("This command is intended to be used by libvirtd "

This LGTM

-- 
Jamie Strandboge             | http://www.canonical.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20191119/200b53d0/attachment-0001.sig>


More information about the libvir-list mailing list