|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] xen/version: Fold print_build_id() into print_version()
commit bfb57fecdc184adf1544cee961fdc7ceb89a9dc9
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Jun 13 15:36:27 2025 +0100
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Aug 5 22:09:35 2025 +0100
xen/version: Fold print_build_id() into print_version()
Both callsites call them as a pair, and more generally, anyone wanting the
changeset wants the buildid too.
This involves rearranging console_init_preirq() to ensure xen_build_init()
is
ahead of print_version().
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/common/keyhandler.c | 1 -
xen/common/version.c | 19 ++++++-------------
xen/drivers/char/console.c | 7 +++----
xen/include/xen/lib.h | 1 -
4 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index b0a2051408..cb6df2823b 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -131,7 +131,6 @@ static void cf_check show_handlers(unsigned char key)
printk("'%c' pressed -> showing installed handlers\n", key);
print_version();
- print_build_id();
for ( i = 0; i < ARRAY_SIZE(key_table); i++ )
if ( key_table[i].fn )
diff --git a/xen/common/version.c b/xen/common/version.c
index 56b51c81d2..84bd77e746 100644
--- a/xen/common/version.c
+++ b/xen/common/version.c
@@ -94,6 +94,9 @@ const char *xen_build_info(void)
return build_info;
}
+static const void *build_id_p __read_mostly;
+static unsigned int build_id_len __read_mostly;
+
void print_version(void)
{
printk("Xen version %d.%d%s (%s@%s) (%s) %s %s\n",
@@ -102,10 +105,10 @@ void print_version(void)
xen_build_info(), xen_compile_date());
printk("Latest ChangeSet: %s\n", xen_changeset());
-}
-static const void *build_id_p __read_mostly;
-static unsigned int build_id_len __read_mostly;
+ if ( build_id_len )
+ printk("build-id: %*phN\n", build_id_len, build_id_p);
+}
int xen_build_id(const void **p, unsigned int *len)
{
@@ -118,16 +121,6 @@ int xen_build_id(const void **p, unsigned int *len)
return 0;
}
-void print_build_id(void)
-{
- /*
- * NB: build_id_len may be 0 if XEN_HAS_BUILD_ID=n.
- * Do not print empty build-id.
- */
- if ( build_id_len )
- printk("build-id: %*phN\n", build_id_len, build_id_p);
-}
-
#ifdef BUILD_ID
/* Defined in linker script. */
extern const Elf_Note __note_gnu_build_id_start[], __note_gnu_build_id_end[];
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 963c7b043c..a5af660239 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -1105,11 +1105,10 @@ void __init console_init_preirq(void)
__putstr(xen_banner());
nrspin_unlock(&console_lock);
- print_version();
-
- /* Locate and print the buildid, if applicable. */
+ /* Locate the buildid, if possible. */
xen_build_init();
- print_build_id();
+
+ print_version();
if ( opt_sync_console )
{
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
index e63ec5039f..36d904ba1a 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -48,7 +48,6 @@ int parse_signed_integer(const char *name, const char *s,
const char *e,
int cmdline_strcmp(const char *frag, const char *name);
void print_version(void);
-void print_build_id(void);
#ifdef CONFIG_DEBUG_TRACE
extern void debugtrace_dump(void);
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |