On Sat, 19 Dec 2009, Idwer Vollering wrote:
> Include detailed versioning information in the binary (--version).
>
> Signed-off-by: Idwer Vollering <[email protected]>
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 <[email protected]>
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
> [email protected]
> http://www.flashrom.org/mailman/listinfo/flashrom
--
Maciej Pijanka
reg. Linux user #133161
--- flashrom.c.ori 2009-12-19 21:32:08.000000000 +0100
+++ flashrom.c 2009-12-19 21:32:31.000000000 +0100
@@ -983,6 +983,11 @@
*/
printf("flashrom v%s, built on %s %s (%s) \n", flashrom_version, osinfo.sysname, osinfo.release,
osinfo.machine);
+#ifdef PCILIB_VERSION
+ printf(" compiled against libpci %s\n", PCILIB_VERSION);
+#endif
+ /* TODO: gcc version?
+ */
}
int main(int argc, char *argv[])
_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom