diff mbox

[v1,01/72] qapi: Extract ErrorClass definition in qapi/common.json

Message ID 1401537111-10221-2-git-send-email-benoit.canet@irqsave.net
State New
Headers show

Commit Message

Benoît Canet May 31, 2014, 11:50 a.m. UTC
Signed-off-by: Benoit Canet <benoit@irqsave.net>
---
 qapi-schema.json | 28 ++--------------------------
 qapi/common.json | 29 +++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 26 deletions(-)
 create mode 100644 qapi/common.json

Comments

Eric Blake June 2, 2014, 2:40 p.m. UTC | #1
On 05/31/2014 05:50 AM, Benoît Canet wrote:
> Signed-off-by: Benoit Canet <benoit@irqsave.net>
> ---
>  qapi-schema.json | 28 ++--------------------------
>  qapi/common.json | 29 +++++++++++++++++++++++++++++
>  2 files changed, 31 insertions(+), 26 deletions(-)
>  create mode 100644 qapi/common.json
> 

> --- /dev/null
> +++ b/qapi/common.json
> @@ -0,0 +1,29 @@
> +# -*- Mode: Python -*-
> +#
> +# QAPI common definitions

I know qapi-schema.json lacks a copyright statement (which I assume
implies to mean it is GPLv2+ ?), but if you are going to create a new
file, it would be nice to make the copyright comment explicit.

As the problem is pre-existing, I'm okay fixing it up in a separate
patch at the same time qapi-schema.json is fixed.

Reviewed-by: Eric Blake <eblake@redhat.com>
diff mbox

Patch

diff --git a/qapi-schema.json b/qapi-schema.json
index 0fd10b6..366a507 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2,32 +2,8 @@ 
 #
 # QAPI Schema
 
-##
-# @ErrorClass
-#
-# QEMU error classes
-#
-# @GenericError: this is used for errors that don't require a specific error
-#                class. This should be the default case for most errors
-#
-# @CommandNotFound: the requested command has not been found
-#
-# @DeviceEncrypted: the requested operation can't be fulfilled because the
-#                   selected device is encrypted
-#
-# @DeviceNotActive: a device has failed to be become active
-#
-# @DeviceNotFound: the requested device has not been found
-#
-# @KVMMissingCap: the requested operation can't be fulfilled because a
-#                 required KVM capability is missing
-#
-# Since: 1.2
-##
-{ 'enum': 'ErrorClass',
-  'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
-            'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
-
+# QAPI common definitions
+{ 'include': 'qapi/common.json' }
 
 ##
 # LostTickPolicy:
diff --git a/qapi/common.json b/qapi/common.json
new file mode 100644
index 0000000..37f63a4
--- /dev/null
+++ b/qapi/common.json
@@ -0,0 +1,29 @@ 
+# -*- Mode: Python -*-
+#
+# QAPI common definitions
+
+##
+# @ErrorClass
+#
+# QEMU error classes
+#
+# @GenericError: this is used for errors that don't require a specific error
+#                class. This should be the default case for most errors
+#
+# @CommandNotFound: the requested command has not been found
+#
+# @DeviceEncrypted: the requested operation can't be fulfilled because the
+#                   selected device is encrypted
+#
+# @DeviceNotActive: a device has failed to be become active
+#
+# @DeviceNotFound: the requested device has not been found
+#
+# @KVMMissingCap: the requested operation can't be fulfilled because a
+#                 required KVM capability is missing
+#
+# Since: 1.2
+##
+{ 'enum': 'ErrorClass',
+  'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
+            'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }