Skip to content

Commit 42211e3

Browse files
leitaoPaolo Abeni
authored andcommitted
netconsole: introduce 'release' as a new sysdata field
This commit adds a new feature to the sysdata structure, allowing the kernel release/version to be appended as part of sysdata. Additionally, it updates the logic to count this new field as a used entry when enabled. Signed-off-by: Breno Leitao <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 08d0185 commit 42211e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/netconsole.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ enum sysdata_feature {
106106
SYSDATA_CPU_NR = BIT(0),
107107
/* Populate the task name (as in current->comm) in sysdata */
108108
SYSDATA_TASKNAME = BIT(1),
109+
/* Kernel release/version as part of sysdata */
110+
SYSDATA_RELEASE = BIT(2),
109111
};
110112

111113
/**
@@ -719,6 +721,8 @@ static size_t count_extradata_entries(struct netconsole_target *nt)
719721
entries += 1;
720722
if (nt->sysdata_fields & SYSDATA_TASKNAME)
721723
entries += 1;
724+
if (nt->sysdata_fields & SYSDATA_RELEASE)
725+
entries += 1;
722726

723727
return entries;
724728
}

0 commit comments

Comments
 (0)