Include detailed versioning information in the binary (--version).
Signed-off-by: Idwer Vollering <[email protected]>
---
Future thoughts: include the used version of libpci.
Index: flashrom.c
===================================================================
--- flashrom.c (revision 808)
+++ flashrom.c (working copy)
@@ -1,3 +1,4 @@
+
/*
* This file is part of the flashrom project.
*
@@ -24,6 +25,7 @@
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/utsname.h>
#include <string.h>
#include <stdlib.h>
#include <getopt.h>
@@ -968,7 +970,19 @@
void print_version(void)
{
+ struct utsname osinfo;
+ uname (&osinfo);
+
+/*
printf("flashrom v%s\n", flashrom_version);
+ printf("sysname: %s\n", osinfo.sysname);
+ printf("nodename: %s\n", osinfo.nodename);
+ printf("release: %s\n", osinfo.release);
+ printf("version: %s\n", osinfo.version);
+ printf("machine: %s\n", osinfo.machine);
+*/
+ printf("flashrom v%s, built on %s %s (%s) \n", flashrom_version, osinfo.sysname, osinfo.release,
+osinfo.machine);
}
int main(int argc, char *argv[])
_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom