Patchwork [V8,01/20] build: add block/snapshot.c

login
register
mail settings
Submitter Wayne Xia
Date March 7, 2013, 6:07 a.m.
Message ID <1362636445-7188-2-git-send-email-xiawenc@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/225749/
State New
Headers show

Comments

Wayne Xia - March 7, 2013, 6:07 a.m.
This file will have internal snapshot related functions.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 block/Makefile.objs      |    1 +
 block/snapshot.c         |   14 ++++++++++++++
 include/block/snapshot.h |    4 ++++
 3 files changed, 19 insertions(+), 0 deletions(-)
 create mode 100644 block/snapshot.c
 create mode 100644 include/block/snapshot.h
Eric Blake - March 8, 2013, 8:18 p.m.
On 03/06/2013 11:07 PM, Wenchao Xia wrote:
>   This file will have internal snapshot related functions.
> 
> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> ---

> --- /dev/null
> +++ b/include/block/snapshot.h
> @@ -0,0 +1,4 @@
> +#ifndef SNAPSHOT_H

Introducing a new file without a copyright notice is a no-no.
Wayne Xia - March 9, 2013, 4 a.m.
> On 03/06/2013 11:07 PM, Wenchao Xia wrote:
>>    This file will have internal snapshot related functions.
>>
>> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
>> ---
> 
>> --- /dev/null
>> +++ b/include/block/snapshot.h
>> @@ -0,0 +1,4 @@
>> +#ifndef SNAPSHOT_H
> 
> Introducing a new file without a copyright notice is a no-no.
> 

  Copy right is notice in snapshot.c, other header files seems
no copy right declaration, what more should be added?
Eric Blake - March 9, 2013, 1:10 p.m.
On 03/08/2013 09:00 PM, Wenchao Xia wrote:
> 
>> On 03/06/2013 11:07 PM, Wenchao Xia wrote:
>>>    This file will have internal snapshot related functions.
>>>
>>> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
>>> ---
>>
>>> --- /dev/null
>>> +++ b/include/block/snapshot.h
>>> @@ -0,0 +1,4 @@
>>> +#ifndef SNAPSHOT_H
>>
>> Introducing a new file without a copyright notice is a no-no.
>>
> 
>   Copy right is notice in snapshot.c, other header files seems
> no copy right declaration, what more should be added?

The copyright of the .c file should be copied to the .h file then.
EVERY file needs a copyright, not just one of a pair of files.

Patch

diff --git a/block/Makefile.objs b/block/Makefile.objs
index c067f38..60a4cd2 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -3,6 +3,7 @@  block-obj-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-c
 block-obj-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o
 block-obj-y += qed-check.o
 block-obj-y += parallels.o blkdebug.o blkverify.o
+block-obj-y += snapshot.o
 block-obj-$(CONFIG_WIN32) += raw-win32.o win32-aio.o
 block-obj-$(CONFIG_POSIX) += raw-posix.o
 block-obj-$(CONFIG_LINUX_AIO) += linux-aio.o
diff --git a/block/snapshot.c b/block/snapshot.c
new file mode 100644
index 0000000..c65519b
--- /dev/null
+++ b/block/snapshot.c
@@ -0,0 +1,14 @@ 
+/*
+ * Snapshot related functions.
+ *
+ * Copyright IBM, Corp. 2013
+ *
+ * Authors:
+ *  Wenchao Xia   <xiawenc@linux.vnet.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU LGPL, version 2 or later.
+ * See the COPYING.LIB file in the top-level directory.
+ *
+ */
+
+#include "block/snapshot.h"
diff --git a/include/block/snapshot.h b/include/block/snapshot.h
new file mode 100644
index 0000000..278e064
--- /dev/null
+++ b/include/block/snapshot.h
@@ -0,0 +1,4 @@ 
+#ifndef SNAPSHOT_H
+#define SNAPSHOT_H
+
+#endif