On Sat, 19 Dec 2009, Idwer Vollering wrote:
Include detailed versioning information in the binary (--version).
Signed-off-by: Idwer Vollering vidwer@gmail.com
another small addon to be added after this patch which print libpci version used for compilation (info aquired from headers)
Signed-off-by: Maciej Pijanka maciej.pijanka@gmail.com
best regards Maciej
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 flashrom@flashrom.org http://www.flashrom.org/mailman/listinfo/flashrom