]> www.infradead.org Git - users/hch/misc.git/commitdiff
netconsole: introduce 'release' as a new sysdata field
authorBreno Leitao <leitao@debian.org>
Fri, 14 Mar 2025 17:58:45 +0000 (10:58 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Fri, 21 Mar 2025 17:59:24 +0000 (18:59 +0100)
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 <leitao@debian.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250314-netcons_release-v1-1-07979c4b86af@debian.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/netconsole.c

index 43757b5c021698977040ad1cb0f355d59cd8ae3f..4f1d9e864020d5cef38a9e53fa0af0d5d0d1343a 100644 (file)
@@ -106,6 +106,8 @@ enum sysdata_feature {
        SYSDATA_CPU_NR = BIT(0),
        /* Populate the task name (as in current->comm) in sysdata */
        SYSDATA_TASKNAME = BIT(1),
+       /* Kernel release/version as part of sysdata */
+       SYSDATA_RELEASE = BIT(2),
 };
 
 /**
@@ -719,6 +721,8 @@ static size_t count_extradata_entries(struct netconsole_target *nt)
                entries += 1;
        if (nt->sysdata_fields & SYSDATA_TASKNAME)
                entries += 1;
+       if (nt->sysdata_fields & SYSDATA_RELEASE)
+               entries += 1;
 
        return entries;
 }