* [RESEND PATCH] apparmor: Use str_yes_no() helper function
@ 2024-12-09 11:05 Thorsten Blum
0 siblings, 0 replies; 5+ messages in thread
From: Thorsten Blum @ 2024-12-09 11:05 UTC (permalink / raw)
To: John Johansen, Paul Moore, James Morris, Serge E. Hallyn
Cc: Thorsten Blum, apparmor, linux-security-module, linux-kernel
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>
---
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;
--
2.47.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [RESEND PATCH] apparmor: Use str_yes_no() helper function
@ 2024-12-20 19:22 Thorsten Blum
2024-12-20 20:19 ` John Johansen
0 siblings, 1 reply; 5+ messages in thread
From: Thorsten Blum @ 2024-12-20 19:22 UTC (permalink / raw)
To: John Johansen, Paul Moore, James Morris, Serge E. Hallyn
Cc: Thorsten Blum, apparmor, linux-security-module, linux-kernel
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>
---
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;
--
2.47.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RESEND PATCH] apparmor: Use str_yes_no() helper function
2024-12-20 19:22 [RESEND PATCH] apparmor: Use str_yes_no() helper function Thorsten Blum
@ 2024-12-20 20:19 ` John Johansen
2025-01-14 10:15 ` Thorsten Blum
0 siblings, 1 reply; 5+ messages in thread
From: John Johansen @ 2024-12-20 20:19 UTC (permalink / raw)
To: Thorsten Blum, Paul Moore, James Morris, Serge E. Hallyn
Cc: apparmor, linux-security-module, linux-kernel
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;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RESEND PATCH] apparmor: Use str_yes_no() helper function
2024-12-20 20:19 ` John Johansen
@ 2025-01-14 10:15 ` Thorsten Blum
2025-01-24 21:56 ` John Johansen
0 siblings, 1 reply; 5+ messages in thread
From: Thorsten Blum @ 2025-01-14 10:15 UTC (permalink / raw)
To: John Johansen
Cc: Paul Moore, James Morris, Serge E. Hallyn, apparmor,
linux-security-module, linux-kernel
On 20. Dec 2024, at 21:19, John Johansen wrote:
> 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
Hi John, I can't find this in linux-next yet. Any ideas?
Thanks,
Thorsten
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RESEND PATCH] apparmor: Use str_yes_no() helper function
2025-01-14 10:15 ` Thorsten Blum
@ 2025-01-24 21:56 ` John Johansen
0 siblings, 0 replies; 5+ messages in thread
From: John Johansen @ 2025-01-24 21:56 UTC (permalink / raw)
To: Thorsten Blum
Cc: Paul Moore, James Morris, Serge E. Hallyn, apparmor,
linux-security-module, linux-kernel
On 1/14/25 02:15, Thorsten Blum wrote:
> On 20. Dec 2024, at 21:19, John Johansen wrote:
>> 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
>
> Hi John, I can't find this in linux-next yet. Any ideas?
>
yeah sorry, I had to disable my pre push hook, it does some sanity checks around
sign-offs, checkpatch, etc and well takes a while. Any ways it was tripping on some stuff
causing it not to push, and the last few week being crazy I just missed it.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-01-24 22:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20 19:22 [RESEND PATCH] apparmor: Use str_yes_no() helper function Thorsten Blum
2024-12-20 20:19 ` John Johansen
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).