[Libguestfs] [PATCH] daemon: selinux: Add setfiles -vv flags when verbose.
Pino Toscano
ptoscano at redhat.com
Tue Mar 21 09:59:48 UTC 2017
On Monday, 20 March 2017 19:15:01 CET Richard W.M. Jones wrote:
> This shows which files are being relabelled. Also only use -q
> (suppress non-error output) when we are not verbose.
> ---
> daemon/selinux-relabel.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/daemon/selinux-relabel.c b/daemon/selinux-relabel.c
> index 2f48ee6..e7da42d 100644
> --- a/daemon/selinux-relabel.c
> +++ b/daemon/selinux-relabel.c
> @@ -112,8 +112,11 @@ do_selinux_relabel (const char *specfile, const char *path,
> ADD_ARG (argv, i, sysroot);
> }
>
> - /* Suppress non-error output. */
> - ADD_ARG (argv, i, "-q");
> + if (verbose)
> + ADD_ARG (argv, i, "-vv");
> + else
> + /* Suppress non-error output. */
> + ADD_ARG (argv, i, "-q");
I've checked the setfiles code (since neither -h nor the manpage mention
anything about that), and it seems -v is a simple switch. Since -vv
behaves as -v, I think passing just -v should be enough.
LGTM otherwise.
Thanks,
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170321/7257a46b/attachment.sig>
More information about the Libguestfs
mailing list