Commit 42211e31 authored by Breno Leitao's avatar Breno Leitao Committed by Paolo Abeni
Browse files

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: default avatarBreno Leitao <leitao@debian.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250314-netcons_release-v1-1-07979c4b86af@debian.org


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 08d0185e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
}