diff mbox

[v5,COLOPre,14/18] tools/libxl: fix backword compatibility after the automatic renaming

Message ID 1450338502-27335-15-git-send-email-wency@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wen Congyang Dec. 17, 2015, 7:48 a.m. UTC
From: Yang Hongyang <hongyang.yang@easystack.cn>

The error code ERROR_REMUS_XXX was introduced in Xen 4.5, and
changed to ERROR_CHECKPOINT_XXX after previous renaming.
The patch fix the backword compatibility.

Signed-off-by: Yang Hongyang <hongyang.yang@easystack.cn>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
 tools/libxl/libxl.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Konrad Rzeszutek Wilk Jan. 25, 2016, 7:43 p.m. UTC | #1
On Thu, Dec 17, 2015 at 03:48:18PM +0800, Wen Congyang wrote:
> From: Yang Hongyang <hongyang.yang@easystack.cn>
> 
> The error code ERROR_REMUS_XXX was introduced in Xen 4.5, and
> changed to ERROR_CHECKPOINT_XXX after previous renaming.
> The patch fix the backword compatibility.
> 
> Signed-off-by: Yang Hongyang <hongyang.yang@easystack.cn>
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> ---
>  tools/libxl/libxl.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
> index 67a4ad7..2a26ba2 100644
> --- a/tools/libxl/libxl.h
> +++ b/tools/libxl/libxl.h
> @@ -883,6 +883,19 @@ void libxl_mac_copy(libxl_ctx *ctx, libxl_mac *dst, libxl_mac *src);
>   */
>  #define LIBXL_HAVE_CHECKPOINTED_STREAM 1
>  
> +/* Remus stuff */

/sRemus stuff//

.. as it is obvious that this is remus related.
> +/*
> + * ERROR_REMUS_XXX error code only exists from Xen 4.5, and in Xen 4.6

s/4.6/4.7/

> + * it is changed to ERROR_CHECKPOINT_XXX
> + */
> +#if defined(LIBXL_API_VERSION) && LIBXL_API_VERSION >= 0x040500 \
> +                               && LIBXL_API_VERSION < 0x040600

s/040600/040700/

> +#define ERROR_REMUS_DEVOPS_DOES_NOT_MATCH \
> +        ERROR_CHECKPOINT_DEVOPS_DOES_NOT_MATCH
> +#define ERROR_REMUS_DEVICE_NOT_SUPPORTED \
> +        ERROR_CHECKPOINT_DEVICE_NOT_SUPPORTED
> +#endif
> +
>  typedef char **libxl_string_list;
>  void libxl_string_list_dispose(libxl_string_list *sl);
>  int libxl_string_list_length(const libxl_string_list *sl);
> -- 
> 2.5.0
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
Wen Congyang Jan. 26, 2016, 8:06 a.m. UTC | #2
On 01/26/2016 03:43 AM, Konrad Rzeszutek Wilk wrote:
> On Thu, Dec 17, 2015 at 03:48:18PM +0800, Wen Congyang wrote:
>> From: Yang Hongyang <hongyang.yang@easystack.cn>
>>
>> The error code ERROR_REMUS_XXX was introduced in Xen 4.5, and
>> changed to ERROR_CHECKPOINT_XXX after previous renaming.
>> The patch fix the backword compatibility.
>>
>> Signed-off-by: Yang Hongyang <hongyang.yang@easystack.cn>
>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>> ---
>>  tools/libxl/libxl.h | 13 +++++++++++++
>>  1 file changed, 13 insertions(+)
>>
>> diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
>> index 67a4ad7..2a26ba2 100644
>> --- a/tools/libxl/libxl.h
>> +++ b/tools/libxl/libxl.h
>> @@ -883,6 +883,19 @@ void libxl_mac_copy(libxl_ctx *ctx, libxl_mac *dst, libxl_mac *src);
>>   */
>>  #define LIBXL_HAVE_CHECKPOINTED_STREAM 1
>>  
>> +/* Remus stuff */
> 
> /sRemus stuff//

Do you mean remove this line?

> 
> .. as it is obvious that this is remus related.
>> +/*
>> + * ERROR_REMUS_XXX error code only exists from Xen 4.5, and in Xen 4.6
> 
> s/4.6/4.7/

Will fix it in the next version.

> 
>> + * it is changed to ERROR_CHECKPOINT_XXX
>> + */
>> +#if defined(LIBXL_API_VERSION) && LIBXL_API_VERSION >= 0x040500 \
>> +                               && LIBXL_API_VERSION < 0x040600
> 
> s/040600/040700/

Will fix it in the next version.

Thanks
Wen Congyang

> 
>> +#define ERROR_REMUS_DEVOPS_DOES_NOT_MATCH \
>> +        ERROR_CHECKPOINT_DEVOPS_DOES_NOT_MATCH
>> +#define ERROR_REMUS_DEVICE_NOT_SUPPORTED \
>> +        ERROR_CHECKPOINT_DEVICE_NOT_SUPPORTED
>> +#endif
>> +
>>  typedef char **libxl_string_list;
>>  void libxl_string_list_dispose(libxl_string_list *sl);
>>  int libxl_string_list_length(const libxl_string_list *sl);
>> -- 
>> 2.5.0
>>
>>
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
> 
> 
> .
>
Konrad Rzeszutek Wilk Jan. 26, 2016, 3:02 p.m. UTC | #3
> >> +/* Remus stuff */
> > 
> > /sRemus stuff//
> 
> Do you mean remove this line?

<nods>
diff mbox

Patch

diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index 67a4ad7..2a26ba2 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -883,6 +883,19 @@  void libxl_mac_copy(libxl_ctx *ctx, libxl_mac *dst, libxl_mac *src);
  */
 #define LIBXL_HAVE_CHECKPOINTED_STREAM 1
 
+/* Remus stuff */
+/*
+ * ERROR_REMUS_XXX error code only exists from Xen 4.5, and in Xen 4.6
+ * it is changed to ERROR_CHECKPOINT_XXX
+ */
+#if defined(LIBXL_API_VERSION) && LIBXL_API_VERSION >= 0x040500 \
+                               && LIBXL_API_VERSION < 0x040600
+#define ERROR_REMUS_DEVOPS_DOES_NOT_MATCH \
+        ERROR_CHECKPOINT_DEVOPS_DOES_NOT_MATCH
+#define ERROR_REMUS_DEVICE_NOT_SUPPORTED \
+        ERROR_CHECKPOINT_DEVICE_NOT_SUPPORTED
+#endif
+
 typedef char **libxl_string_list;
 void libxl_string_list_dispose(libxl_string_list *sl);
 int libxl_string_list_length(const libxl_string_list *sl);