lkml.org 
[lkml]   [2023]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v3 2/4] netconsole: Initialize configfs_item for default targets
On Tue, Oct 10, 2023 at 02:37:49AM -0700, Breno Leitao wrote:
> For netconsole targets allocated during the boot time (passing
> netconsole=... argument), netconsole_target->item is not initialized.
> That is not a problem because it is not used inside configfs.
>
> An upcoming patch will be using it, thus, initialize the targets with
> the name 'cmdline' plus a counter starting from 0. This name will match
> entries in the configfs later.
>
> Suggested-by: Joel Becker <jlbec@evilplan.org>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> drivers/net/netconsole.c | 25 +++++++++++++++++++++++--
> 1 file changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
> index d609fb59cf99..3d7002af505d 100644
> --- a/drivers/net/netconsole.c
> +++ b/drivers/net/netconsole.c
> @@ -53,6 +53,8 @@ static bool oops_only = false;
> module_param(oops_only, bool, 0600);
> MODULE_PARM_DESC(oops_only, "Only log oops messages");
>
> +#define NETCONSOLE_PARAM_TARGET_NAME "cmdline"

Perhaps `NETCONSOLE_PARAM_TARGET_PREFIX` is better. Makes it clear this
is not the whole name.

Thanks,
Joel


--

"When I am working on a problem I never think about beauty. I
only think about how to solve the problem. But when I have finished, if
the solution is not beautiful, I know it is wrong."
- Buckminster Fuller

http://www.jlbec.org/
jlbec@evilplan.org

\
 
 \ /
  Last update: 2023-10-10 21:28    [W:0.079 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site