misc: Add license blurb to unlicensed files

This was roughly achieved with:

$ git ls-files |
	grep '.[ch]p*$' |
	while read F; do head -n 1 $F | fgrep -v '/*' > /dev/null && echo $F; done |
	while read L; do cat apache $L > ${L}.tmp; mv ${L}.tmp ${L}; done

Some fixups performed by hand to eliminate modifications to files that
were hit which should not have been.

Change-Id: I9fa5af4644687d8b595a6cf70d6f7575a767d11a
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/mboxd_pnor_partition_table.cpp b/mboxd_pnor_partition_table.cpp
index 39a4529..91b9880 100644
--- a/mboxd_pnor_partition_table.cpp
+++ b/mboxd_pnor_partition_table.cpp
@@ -1,3 +1,21 @@
+/*
+ * Mailbox Daemon Window Helpers
+ *
+ * Copyright 2018 IBM
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 #include "mboxd_pnor_partition_table.h"
 #include "common.h"
 #include "mbox.h"
diff --git a/mboxd_pnor_partition_table.h b/mboxd_pnor_partition_table.h
index 122c933..beb9ced 100644
--- a/mboxd_pnor_partition_table.h
+++ b/mboxd_pnor_partition_table.h
@@ -1,3 +1,21 @@
+/*
+ * Mailbox Daemon Implementation
+ *
+ * Copyright 2018 IBM
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 #pragma once
 
 #ifdef VIRTUAL_PNOR_ENABLED
diff --git a/mtd.c b/mtd.c
index 46d660e..38d6f24 100644
--- a/mtd.c
+++ b/mtd.c
@@ -1,3 +1,21 @@
+/*
+ * Mailbox Daemon Implementation
+ *
+ * Copyright 2018 IBM
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 #define _GNU_SOURCE
 #include <stdbool.h>
 #include <stdio.h>
diff --git a/pnor_partition.cpp b/pnor_partition.cpp
index 9fee496..1868ed7 100644
--- a/pnor_partition.cpp
+++ b/pnor_partition.cpp
@@ -1,3 +1,21 @@
+/*
+ * Mailbox Daemon Implementation
+ *
+ * Copyright 2018 IBM
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 #include "pnor_partition.hpp"
 #include "config.h"
 #include "mboxd_flash.h"
diff --git a/pnor_partition.hpp b/pnor_partition.hpp
index 242da37..986ca1f 100644
--- a/pnor_partition.hpp
+++ b/pnor_partition.hpp
@@ -1,3 +1,21 @@
+/*
+ * Mailbox Daemon Implementation
+ *
+ * Copyright 2018 IBM
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 #pragma once
 
 #include "mboxd_pnor_partition_table.h"
diff --git a/pnor_partition_defs.h b/pnor_partition_defs.h
index ab2ca6b..309363d 100644
--- a/pnor_partition_defs.h
+++ b/pnor_partition_defs.h
@@ -1,3 +1,21 @@
+/*
+ * Mailbox Daemon Implementation
+ *
+ * Copyright 2018 IBM
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 #pragma once
 
 #include <stdint.h>
diff --git a/pnor_partition_table.cpp b/pnor_partition_table.cpp
index eb956d6..cf59c41 100644
--- a/pnor_partition_table.cpp
+++ b/pnor_partition_table.cpp
@@ -1,3 +1,21 @@
+/*
+ * Mailbox Daemon Implementation
+ *
+ * Copyright 2018 IBM
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 #include "pnor_partition_table.hpp"
 #include "common.h"
 #include "config.h"
diff --git a/pnor_partition_table.hpp b/pnor_partition_table.hpp
index d19ff4b..1b932a1 100644
--- a/pnor_partition_table.hpp
+++ b/pnor_partition_table.hpp
@@ -1,3 +1,21 @@
+/*
+ * Mailbox Daemon Implementation
+ *
+ * Copyright 2018 IBM
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 #pragma once
 
 #include <vector>
diff --git a/test/sanity.c b/test/sanity.c
index b4989f8..f96c35b 100644
--- a/test/sanity.c
+++ b/test/sanity.c
@@ -1,3 +1,21 @@
+/*
+ * Mailbox Daemon Implementation
+ *
+ * Copyright 2018 IBM
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 int main(void)
 {
 #ifdef NDEBUG
diff --git a/test/vpnor/create_pnor_partition_table.cpp b/test/vpnor/create_pnor_partition_table.cpp
index 57bb675..b3475d0 100644
--- a/test/vpnor/create_pnor_partition_table.cpp
+++ b/test/vpnor/create_pnor_partition_table.cpp
@@ -1,3 +1,21 @@
+/*
+ * MBox Daemon Test File
+ *
+ * Copyright 2018 IBM
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 #include "pnor_partition_table.hpp"
 #include "config.h"
 #include <assert.h>
diff --git a/test/vpnor/create_read_window_vpnor.cpp b/test/vpnor/create_read_window_vpnor.cpp
index 3ea6bb5..24a8e42 100644
--- a/test/vpnor/create_read_window_vpnor.cpp
+++ b/test/vpnor/create_read_window_vpnor.cpp
@@ -1,3 +1,22 @@
+/*
+ * MBox Daemon Test File
+ *
+ * Copyright 2018 IBM
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 #include "config.h"
 #include "mboxd_pnor_partition_table.h"