[PATCH 12/20] fwts_clog: add fwts_clog_free

Marcello Sylvester Bauer info at marcellobauer.com
Wed Jun 20 12:14:38 UTC 2018


Add fwts_clog library for scanning coreboot logs.

Signed-off-by: Marcello Sylvester Bauer <info at marcellobauer.com>
---
 src/lib/include/fwts.h      |  1 +
 src/lib/include/fwts_clog.h | 28 ++++++++++++++++++++++++++++
 src/lib/src/Makefile.am     |  1 +
 src/lib/src/fwts_clog.c     | 29 +++++++++++++++++++++++++++++
 4 files changed, 59 insertions(+)
 create mode 100644 src/lib/include/fwts_clog.h
 create mode 100644 src/lib/src/fwts_clog.c

diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
index 9f992ef2..95e8f560 100644
--- a/src/lib/include/fwts.h
+++ b/src/lib/include/fwts.h
@@ -88,6 +88,7 @@
 #include "fwts_acpid.h"
 #include "fwts_arch.h"
 #include "fwts_checkeuid.h"
+#include "fwts_clog.h"
 #include "fwts_cpu.h"
 #include "fwts_dump.h"
 #include "fwts_dump_data.h"
diff --git a/src/lib/include/fwts_clog.h b/src/lib/include/fwts_clog.h
new file mode 100644
index 00000000..87ecc438
--- /dev/null
+++ b/src/lib/include/fwts_clog.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2010-2018 Canonical
+ * Copyright (C) 2018 9elements Cyber Security
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef __FWTS_CLOG_H__
+#define __FWTS_CLOG_H__
+
+#include "fwts.h"
+
+void       fwts_clog_free(fwts_list *list);
+
+#endif
diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
index 382a0abf..77e99eae 100644
--- a/src/lib/src/Makefile.am
+++ b/src/lib/src/Makefile.am
@@ -59,6 +59,7 @@ libfwts_la_SOURCES = 		\
 	fwts_button.c 		\
 	fwts_checkeuid.c 	\
 	fwts_checksum.c 	\
+	fwts_clog.c		\
 	fwts_cmos.c 		\
 	fwts_cpu.c 		\
 	fwts_dump.c 		\
diff --git a/src/lib/src/fwts_clog.c b/src/lib/src/fwts_clog.c
new file mode 100644
index 00000000..3887e6fc
--- /dev/null
+++ b/src/lib/src/fwts_clog.c
@@ -0,0 +1,29 @@
+ /*
+ * Copyright (C) 2010-2018 Canonical
+ * Copyright (C) 2018 9elements Cyber Security
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "fwts.h"
+
+/*
+ *  free coreboot log list
+ */
+void fwts_clog_free(fwts_list *clog)
+{
+        fwts_log_free(clog);
+}
-- 
2.16.4




More information about the fwts-devel mailing list