diff mbox

[V8,02/20] build: add block/qapi.c

Message ID 1362636445-7188-3-git-send-email-xiawenc@linux.vnet.ibm.com
State New
Headers show

Commit Message

Wayne Xia March 7, 2013, 6:07 a.m. UTC
This file will have qmp related functions for block. To avoid conflict and
tip better, macro in header file is BLOCK_QAPI_H instead of QAPI_H.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 block/Makefile.objs  |    2 +-
 block/qapi.c         |   14 ++++++++++++++
 include/block/qapi.h |    4 ++++
 3 files changed, 19 insertions(+), 1 deletions(-)
 create mode 100644 block/qapi.c
 create mode 100644 include/block/qapi.h

Comments

Eric Blake March 8, 2013, 8:22 p.m. UTC | #1
On 03/06/2013 11:07 PM, Wenchao Xia wrote:
>   This file will have qmp related functions for block. To avoid conflict and
> tip better, macro in header file is BLOCK_QAPI_H instead of QAPI_H.
> 
> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> ---

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

Again, introducing a new file without a copyright notice is a no-no.

Why are you adding stub files in two separate patches?  If you're going
to bother with stub files, then add all of them in one commit.  But my
preference would be to add one file at a time, but with contents instead
of being a stub (for example, merge patch 1 and 3, and merge patch 2 and
6).  It just feels like you have subdivided this series too far.
Wayne Xia March 9, 2013, 4:05 a.m. UTC | #2
于 2013-3-9 4:22, Eric Blake 写道:
> On 03/06/2013 11:07 PM, Wenchao Xia wrote:
>>    This file will have qmp related functions for block. To avoid conflict and
>> tip better, macro in header file is BLOCK_QAPI_H instead of QAPI_H.
>>
>> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
>> ---
> 
>> --- /dev/null
>> +++ b/include/block/qapi.h
>> @@ -0,0 +1,4 @@
>> +#ifndef BLOCK_QAPI_H
> 
> Again, introducing a new file without a copyright notice is a no-no.
> 
> Why are you adding stub files in two separate patches?  If you're going
> to bother with stub files, then add all of them in one commit.  But my
> preference would be to add one file at a time, but with contents instead
> of being a stub (for example, merge patch 1 and 3, and merge patch 2 and
> 6).  It just feels like you have subdivided this series too far.
> 
  Just to make it easy for review, one patch for one step. I am OK to
merge if you insist, but prefer not for that these stub brings no
trouble, to save effort.
diff mbox

Patch

diff --git a/block/Makefile.objs b/block/Makefile.objs
index 60a4cd2..fc27bed 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -3,7 +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-y += snapshot.o qapi.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/qapi.c b/block/qapi.c
new file mode 100644
index 0000000..3ac3590
--- /dev/null
+++ b/block/qapi.c
@@ -0,0 +1,14 @@ 
+/*
+ * Block layer qmp 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/qapi.h"
diff --git a/include/block/qapi.h b/include/block/qapi.h
new file mode 100644
index 0000000..e1c0967
--- /dev/null
+++ b/include/block/qapi.h
@@ -0,0 +1,4 @@ 
+#ifndef BLOCK_QAPI_H
+#define BLOCK_QAPI_H
+
+#endif