2009/12/20 Carl-Daniel Hailfinger <[email protected]>

> On 19.12.2009 23:34, Maciej Pijanka wrote:
> > 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]>
> >
>
> Thanks for your patch. Would you mind moving it to internal.c in
> print_sysinfo() after Idwer reposts his patch which should create
> print_sysinfo?
>

flashrom_r808_uname-mrs_v3.diff


>
> Oh, and it would be cool if you could wrap this differently:
> #if NEED_PCI==1
> #ifdef PCILIB_VERSION
> printf(" compiled against libpci %s\n", PCILIB_VERSION);
> #else
> printf("compiled against unknown PCI library\n);
> #endif
> #endif
>
> Regards,
> Carl-Daniel
>
> --
> Developer quote of the month:
> "We are juggling too many chainsaws and flaming arrows and tigers."
>
>
Index: Makefile
===================================================================
--- Makefile	(revision 808)
+++ Makefile	(working copy)
@@ -25,7 +25,7 @@
 DIFF    = diff
 PREFIX  ?= /usr/local
 MANDIR  ?= $(PREFIX)/share/man
-CFLAGS  ?= -Os -Wall -Werror
+CFLAGS  ?= -Os -Wall -Werror -DBUILD_OS="\"$(shell uname -mrs)\""
 EXPORTDIR ?= .
 
 OS_ARCH	= $(shell uname)
Index: flashrom.c
===================================================================
--- flashrom.c	(revision 808)
+++ flashrom.c	(working copy)
@@ -966,9 +966,12 @@
 	exit(1);
 }
 
+void print_buildinfo(void);
+
 void print_version(void)
 {
 	printf("flashrom v%s\n", flashrom_version);
+	print_buildinfo();
 }
 
 int main(int argc, char *argv[])
Index: internal.c
===================================================================
--- internal.c	(revision 808)
+++ internal.c	(working copy)
@@ -31,6 +31,13 @@
 int io_fd;
 #endif
 
+const char *build_os = BUILD_OS;
+
+void print_buildinfo()
+{
+	printf("Built on: %s\n", build_os);
+}
+
 #if NEED_PCI == 1
 struct pci_dev *pci_dev_find_filter(struct pci_filter filter)
 {
_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to