mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Johansen <john.johansen@canonical.com>
To: Thorsten Blum <thorsten.blum@linux.dev>,
	Paul Moore <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>
Cc: apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] apparmor: Use str_yes_no() helper function
Date: Fri, 20 Dec 2024 12:19:46 -0800	[thread overview]
Message-ID: <d93ed7bb-b184-4153-8084-b693eb1e2b85@canonical.com> (raw)
In-Reply-To: <20241220192243.1856-1-thorsten.blum@linux.dev>

On 12/20/24 11:22, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_yes_no() helper function.
> 
> Fix a typo in a comment: s/unpritable/unprintable/
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Hey Thorsten,

sorry for the delay on this I am just really backlogged and will try to catch-up
on the mailing list traffic this weekend.

Acked-by: John Johansen <john.johansen@canonical.com>

I have pulled this into my tree and it should migrate into linux-next soon

> ---
>   security/apparmor/apparmorfs.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
> index 2c0185ebc900..1bce9a7d2129 100644
> --- a/security/apparmor/apparmorfs.c
> +++ b/security/apparmor/apparmorfs.c
> @@ -997,7 +997,7 @@ static int aa_sfs_seq_show(struct seq_file *seq, void *v)
>   
>   	switch (fs_file->v_type) {
>   	case AA_SFS_TYPE_BOOLEAN:
> -		seq_printf(seq, "%s\n", fs_file->v.boolean ? "yes" : "no");
> +		seq_printf(seq, "%s\n", str_yes_no(fs_file->v.boolean));
>   		break;
>   	case AA_SFS_TYPE_STRING:
>   		seq_printf(seq, "%s\n", fs_file->v.string);
> @@ -1006,7 +1006,7 @@ static int aa_sfs_seq_show(struct seq_file *seq, void *v)
>   		seq_printf(seq, "%#08lx\n", fs_file->v.u64);
>   		break;
>   	default:
> -		/* Ignore unpritable entry types. */
> +		/* Ignore unprintable entry types. */
>   		break;
>   	}
>   
> @@ -1152,7 +1152,7 @@ static int seq_ns_stacked_show(struct seq_file *seq, void *v)
>   	struct aa_label *label;
>   
>   	label = begin_current_label_crit_section();
> -	seq_printf(seq, "%s\n", label->size > 1 ? "yes" : "no");
> +	seq_printf(seq, "%s\n", str_yes_no(label->size > 1));
>   	end_current_label_crit_section(label);
>   
>   	return 0;
> @@ -1175,7 +1175,7 @@ static int seq_ns_nsstacked_show(struct seq_file *seq, void *v)
>   			}
>   	}
>   
> -	seq_printf(seq, "%s\n", count > 1 ? "yes" : "no");
> +	seq_printf(seq, "%s\n", str_yes_no(count > 1));
>   	end_current_label_crit_section(label);
>   
>   	return 0;


  reply	other threads:[~2024-12-20 20:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20 19:22 Thorsten Blum
2024-12-20 20:19 ` John Johansen [this message]
2025-01-14 10:15   ` Thorsten Blum
2025-01-24 21:56     ` John Johansen
  -- strict thread matches above, loose matches on Subject: below --
2024-12-09 11:05 Thorsten Blum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d93ed7bb-b184-4153-8084-b693eb1e2b85@canonical.com \
    --to=john.johansen@canonical.com \
    --cc=apparmor@lists.ubuntu.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=serge@hallyn.com \
    --cc=thorsten.blum@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®