All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0 of 2] rename libxl__yajl_gen_alloc
@ 2012-02-09 12:52 Olaf Hering
  2012-02-09 12:52 ` [PATCH 1 of 2] tools/libxl: " Olaf Hering
  2012-02-09 12:53 ` [PATCH 2 of 2] tools/libxl: use libxl wrapper for yajl_gen_alloc Olaf Hering
  0 siblings, 2 replies; 5+ messages in thread
From: Olaf Hering @ 2012-02-09 12:52 UTC (permalink / raw)
  To: xen-devel


Changes:
tools/libxl: rename libxl__yajl_gen_alloc
tools/libxl: use libxl wrapper for yajl_gen_alloc

 tools/libxl/Makefile     |    2 +-
 tools/libxl/libxl_json.c |    2 +-
 tools/libxl/libxl_json.h |    4 ++--
 tools/libxl/libxl_qmp.c  |    2 +-
 tools/libxl/xl_cmdimpl.c |    5 ++---
 5 files changed, 7 insertions(+), 8 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1 of 2] tools/libxl: rename libxl__yajl_gen_alloc
  2012-02-09 12:52 [PATCH 0 of 2] rename libxl__yajl_gen_alloc Olaf Hering
@ 2012-02-09 12:52 ` Olaf Hering
  2012-02-09 13:05   ` Ian Campbell
  2012-02-09 12:53 ` [PATCH 2 of 2] tools/libxl: use libxl wrapper for yajl_gen_alloc Olaf Hering
  1 sibling, 1 reply; 5+ messages in thread
From: Olaf Hering @ 2012-02-09 12:52 UTC (permalink / raw)
  To: xen-devel

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1328791447 -3600
# Node ID 85fcc1d0f072c4f9d1e8f13b8bb2634228a16f6c
# Parent  8ba7ae0b070b4de93fc033067c61714c202d64c1
tools/libxl: rename libxl__yajl_gen_alloc

libxl__yajl_gen_alloc() is called by generic code,
rename it to libx__yajl_gen_alloc().

Signed-off-by: Olaf Hering <olaf@aepfle.de>

diff -r 8ba7ae0b070b -r 85fcc1d0f072 tools/libxl/libxl_json.c
--- a/tools/libxl/libxl_json.c
+++ b/tools/libxl/libxl_json.c
@@ -813,7 +813,7 @@ char *libxl__object_to_json(libxl_ctx *c
     yajl_gen_status s;
     yajl_gen hand;
 
-    hand = libxl__yajl_gen_alloc(NULL);
+    hand = libxl_yajl_gen_alloc(NULL);
     if (!hand)
         return NULL;
 
diff -r 8ba7ae0b070b -r 85fcc1d0f072 tools/libxl/libxl_json.h
--- a/tools/libxl/libxl_json.h
+++ b/tools/libxl/libxl_json.h
@@ -40,7 +40,7 @@ static inline yajl_handle libxl__yajl_al
     return yajl_alloc(callbacks, allocFuncs, ctx);
 }
 
-static inline yajl_gen libxl__yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs)
+static inline yajl_gen libxl_yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs)
 {
     return yajl_gen_alloc(allocFuncs);
 }
@@ -62,7 +62,7 @@ static inline yajl_handle libxl__yajl_al
     return yajl_alloc(callbacks, &cfg, allocFuncs, ctx);
 }
 
-static inline yajl_gen libxl__yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs)
+static inline yajl_gen libxl_yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs)
 {
     yajl_gen_config conf = { 1, "    " };
     return yajl_gen_alloc(&conf, allocFuncs);
diff -r 8ba7ae0b070b -r 85fcc1d0f072 tools/libxl/libxl_qmp.c
--- a/tools/libxl/libxl_qmp.c
+++ b/tools/libxl/libxl_qmp.c
@@ -461,7 +461,7 @@ static char *qmp_send_prepare(libxl__gc 
     yajl_gen hand;
     callback_id_pair *elm = NULL;
 
-    hand = libxl__yajl_gen_alloc(NULL);
+    hand = libxl_yajl_gen_alloc(NULL);
 
     if (!hand) {
         return NULL;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2 of 2] tools/libxl: use libxl wrapper for yajl_gen_alloc
  2012-02-09 12:52 [PATCH 0 of 2] rename libxl__yajl_gen_alloc Olaf Hering
  2012-02-09 12:52 ` [PATCH 1 of 2] tools/libxl: " Olaf Hering
@ 2012-02-09 12:53 ` Olaf Hering
  1 sibling, 0 replies; 5+ messages in thread
From: Olaf Hering @ 2012-02-09 12:53 UTC (permalink / raw)
  To: xen-devel

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1328791471 -3600
# Node ID 14394647c54e40d82f4dbce2d6571a3d9b836719
# Parent  85fcc1d0f072c4f9d1e8f13b8bb2634228a16f6c
tools/libxl: use libxl wrapper for yajl_gen_alloc

To fix compile errors with libyajl2:
use libxl_yajl_gen_alloc()
use libxl_yajl_length
link xl with -lyajl for yajl_gen_string()

Signed-off-by: Olaf Hering <olaf@aepfle.de>

diff -r 85fcc1d0f072 -r 14394647c54e tools/libxl/Makefile
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -142,7 +142,7 @@ libxlutil.a: $(LIBXLU_OBJS)
 	$(AR) rcs libxlutil.a $^
 
 xl: $(XL_OBJS) libxlutil.so libxenlight.so
-	$(CC) $(LDFLAGS) -o $@ $(XL_OBJS) libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
+	$(CC) $(LDFLAGS) -o $@ $(XL_OBJS) libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) -lyajl $(APPEND_LDFLAGS)
 
 testidl: testidl.o libxlutil.so libxenlight.so
 	$(CC) $(LDFLAGS) -o $@ testidl.o libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
diff -r 85fcc1d0f072 -r 14394647c54e tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -297,13 +297,12 @@ static void printf_info(enum output_form
     if (output_format == OUTPUT_FORMAT_SXP)
         return printf_info_sexp(domid, d_config);
 
-    yajl_gen_config conf = { 1, "    " };
     const char *buf;
-    unsigned int len = 0;
+    libxl_yajl_length len = 0;
     yajl_gen_status s;
     yajl_gen hand;
 
-    hand = yajl_gen_alloc(&conf, NULL);
+    hand = libxl_yajl_gen_alloc(NULL);
     if (!hand) {
         fprintf(stderr, "unable to allocate JSON generator\n");
         return;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1 of 2] tools/libxl: rename libxl__yajl_gen_alloc
  2012-02-09 12:52 ` [PATCH 1 of 2] tools/libxl: " Olaf Hering
@ 2012-02-09 13:05   ` Ian Campbell
  2012-02-29 14:33     ` Ian Jackson
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2012-02-09 13:05 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel@lists.xensource.com

On Thu, 2012-02-09 at 12:52 +0000, Olaf Hering wrote:
> # HG changeset patch
> # User Olaf Hering <olaf@aepfle.de>
> # Date 1328791447 -3600
> # Node ID 85fcc1d0f072c4f9d1e8f13b8bb2634228a16f6c
> # Parent  8ba7ae0b070b4de93fc033067c61714c202d64c1
> tools/libxl: rename libxl__yajl_gen_alloc
> 
> libxl__yajl_gen_alloc() is called by generic code,
> rename it to libx__yajl_gen_alloc().

Other than this typo both patches in this series look good to me,
thanks.

Acked-by: Ian Campbell <ian.campbell@citrix.com>

> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> 
> diff -r 8ba7ae0b070b -r 85fcc1d0f072 tools/libxl/libxl_json.c
> --- a/tools/libxl/libxl_json.c
> +++ b/tools/libxl/libxl_json.c
> @@ -813,7 +813,7 @@ char *libxl__object_to_json(libxl_ctx *c
>      yajl_gen_status s;
>      yajl_gen hand;
>  
> -    hand = libxl__yajl_gen_alloc(NULL);
> +    hand = libxl_yajl_gen_alloc(NULL);
>      if (!hand)
>          return NULL;
>  
> diff -r 8ba7ae0b070b -r 85fcc1d0f072 tools/libxl/libxl_json.h
> --- a/tools/libxl/libxl_json.h
> +++ b/tools/libxl/libxl_json.h
> @@ -40,7 +40,7 @@ static inline yajl_handle libxl__yajl_al
>      return yajl_alloc(callbacks, allocFuncs, ctx);
>  }
>  
> -static inline yajl_gen libxl__yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs)
> +static inline yajl_gen libxl_yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs)
>  {
>      return yajl_gen_alloc(allocFuncs);
>  }
> @@ -62,7 +62,7 @@ static inline yajl_handle libxl__yajl_al
>      return yajl_alloc(callbacks, &cfg, allocFuncs, ctx);
>  }
>  
> -static inline yajl_gen libxl__yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs)
> +static inline yajl_gen libxl_yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs)
>  {
>      yajl_gen_config conf = { 1, "    " };
>      return yajl_gen_alloc(&conf, allocFuncs);
> diff -r 8ba7ae0b070b -r 85fcc1d0f072 tools/libxl/libxl_qmp.c
> --- a/tools/libxl/libxl_qmp.c
> +++ b/tools/libxl/libxl_qmp.c
> @@ -461,7 +461,7 @@ static char *qmp_send_prepare(libxl__gc 
>      yajl_gen hand;
>      callback_id_pair *elm = NULL;
>  
> -    hand = libxl__yajl_gen_alloc(NULL);
> +    hand = libxl_yajl_gen_alloc(NULL);
>  
>      if (!hand) {
>          return NULL;
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1 of 2] tools/libxl: rename libxl__yajl_gen_alloc
  2012-02-09 13:05   ` Ian Campbell
@ 2012-02-29 14:33     ` Ian Jackson
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Jackson @ 2012-02-29 14:33 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Olaf Hering, xen-devel@lists.xensource.com

Ian Campbell writes ("Re: [Xen-devel] [PATCH 1 of 2] tools/libxl: rename libxl__yajl_gen_alloc"):
> On Thu, 2012-02-09 at 12:52 +0000, Olaf Hering wrote:
> > libxl__yajl_gen_alloc() is called by generic code,
> > rename it to libx__yajl_gen_alloc().
> 
> Other than this typo both patches in this series look good to me,
> thanks.
> 
> Acked-by: Ian Campbell <ian.campbell@citrix.com>

Thanks, applied both (with fixed message for 1/2).

Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-29 14:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09 12:52 [PATCH 0 of 2] rename libxl__yajl_gen_alloc Olaf Hering
2012-02-09 12:52 ` [PATCH 1 of 2] tools/libxl: " Olaf Hering
2012-02-09 13:05   ` Ian Campbell
2012-02-29 14:33     ` Ian Jackson
2012-02-09 12:53 ` [PATCH 2 of 2] tools/libxl: use libxl wrapper for yajl_gen_alloc Olaf Hering

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.