summaryrefslogtreecommitdiff
path: root/tools/bootconfig/main.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2021-09-16 09:23:29 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-10-11 03:43:53 +0300
commite306220cb7b7c2948f191414ab06851e143b54c1 (patch)
treeba1934544e721a548cc94935c1a4878cec050739 /tools/bootconfig/main.c
parentbdac5c2b243f68ec15f8203c3348ae79fee8e8d8 (diff)
downloadlinux-e306220cb7b7c2948f191414ab06851e143b54c1.tar.xz
bootconfig: Add xbc_get_info() for the node information
Add xbc_get_info() API which allows user to get the number of used xbc_nodes and the size of bootconfig data. This is also useful for checking the bootconfig is initialized or not. Link: https://lkml.kernel.org/r/163177340877.682366.4360676589783197627.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools/bootconfig/main.c')
-rw-r--r--tools/bootconfig/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 7269c9e35335..4f2a8d884745 100644
--- a/tools/bootconfig/main.c
+++ b/tools/bootconfig/main.c
@@ -391,6 +391,7 @@ static int apply_xbc(const char *path, const char *xbc_path)
return ret;
}
printf("Apply %s to %s\n", xbc_path, path);
+ xbc_get_info(&ret, NULL);
printf("\tNumber of nodes: %d\n", ret);
printf("\tSize: %u bytes\n", (unsigned int)size);
printf("\tChecksum: %d\n", (unsigned int)csum);