Skip to contentSkip to conversation

libxl: add missing action in DEFINE_DEVICE_ADD

PATCH Applied Wei Liu 3 participants 7 messages Nov 12, 2014 – Nov 14, 2014

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 libxl: add missing action in DEFINE_DEVICE_ADD

... otherwise when device add operation fails, the error message looks like "libxl: error: libxl.c:1897:device_addrm_aocomplete: unable to (null) device", which is not very helpful.

Cc Ian Campbell <[email protected]>
Cc Ian Jackson <[email protected]>
---
 tools/libxl/libxl.c |    1 +
 1 file changed, 1 insertion(+)
tools/libxl/libxl.c +1 -0
index f7961f6..de23fec 100644
@@ -4164,6 +4164,7 @@ DEFINE_DEVICE_REMOVE(vtpm, destroy, 1)
                                                                         \
         GCNEW(aodev);                                                   \
         libxl__prepare_ao_device(ao, aodev);                            \
+        aodev->action = LIBXL__DEVICE_ACTION_ADD;                       \
         aodev->callback = device_addrm_aocomplete;                      \
         aodev->update_json = true;                                      \
         libxl__device_##type##_add(egc, domid, type, aodev);            \
Signature · 1 line
1.7.10.4
author
#1 lore raw

And of course this is v2 of this patch. Sorry for not having added that in the subject line.

Acked-by on v1 1/1
#2 lore raw
In reply to Wei Liu
Quoted 3 lines · Wei Liu

... otherwise when device add operation fails, the error message looks like "libxl: error: libxl.c:1897:device_addrm_aocomplete: unable to (null) device", which is not very helpful.

Thanks.

Quoted 2 lines
Quoted 17 lines
Cc Ian Jackson <[email protected]>
---
 tools/libxl/libxl.c |    1 +
 1 file changed, 1 insertion(+)
tools/libxl/libxl.c +1 -0
index f7961f6..de23fec 100644
@@ -4164,6 +4164,7 @@ DEFINE_DEVICE_REMOVE(vtpm, destroy, 1)
                                                                         \
         GCNEW(aodev);                                                   \
         libxl__prepare_ao_device(ao, aodev);                            \
+        aodev->action = LIBXL__DEVICE_ACTION_ADD;                       \
         aodev->callback = device_addrm_aocomplete;                      \
         aodev->update_json = true;                                      \
         libxl__device_##type##_add(egc, domid, type, aodev);            \
#3 lore raw
Quoted 10 lines · Ian Campbell
Quoted 3 lines · Wei Liu

... otherwise when device add operation fails, the error message looks like "libxl: error: libxl.c:1897:device_addrm_aocomplete: unable to (null) device", which is not very helpful.

Thanks.

Quoted 2 lines
Quoted 25 lines
Quoted 11 lines
Cc Ian Jackson <[email protected]>
---
 tools/libxl/libxl.c |    1 +
 1 file changed, 1 insertion(+)
tools/libxl/libxl.c +0 -0
index f7961f6..de23fec 100644

tools/libxl/libxl.c DEFINE_DEVICE_REMOVE(vtpm, destroy, 1) · line 4170

Quoted 7 lines
tools/libxl/libxl.c +1 -0
@@ -4164,6 +4164,7 @@ DEFINE_DEVICE_REMOVE(vtpm, destroy, 1)
                                                                         \
         GCNEW(aodev);                                                   \
         libxl__prepare_ao_device(ao, aodev);                            \
+        aodev->action = LIBXL__DEVICE_ACTION_ADD;                       \
         aodev->callback = device_addrm_aocomplete;                      \
         aodev->update_json = true;                                      \
         libxl__device_##type##_add(egc, domid, type, aodev);            \

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Applied
#4 lore raw
Quoted 6 lines · Konrad Rzeszutek Wilk
Quoted 5 lines · Ian Campbell
Quoted 3 lines · Wei Liu

... otherwise when device add operation fails, the error message looks like "libxl: error: libxl.c:1897:device_addrm_aocomplete: unable to (null) device", which is not very helpful.

Quoted 7 lines
Quoted 5 lines

Thanks.

Quoted 2 lines

Applied, thanks.

#5 lore raw
In reply to Ian Campbell
Quoted 10 lines · Ian Campbell
Quoted 3 lines · Wei Liu

... otherwise when device add operation fails, the error message looks like "libxl: error: libxl.c:1897:device_addrm_aocomplete: unable to (null) device", which is not very helpful.

Thanks.

Quoted 2 lines

Konrad, in v1 Wei said "This is a simple enough bug fix I think it should just go in." and I agree.

Quoted 25 lines
Quoted 11 lines
Cc Ian Jackson <[email protected]>
---
 tools/libxl/libxl.c |    1 +
 1 file changed, 1 insertion(+)
tools/libxl/libxl.c +0 -0
index f7961f6..de23fec 100644

tools/libxl/libxl.c DEFINE_DEVICE_REMOVE(vtpm, destroy, 1) · line 4170

Quoted 7 lines
tools/libxl/libxl.c +1 -0
@@ -4164,6 +4164,7 @@ DEFINE_DEVICE_REMOVE(vtpm, destroy, 1)
                                                                         \
         GCNEW(aodev);                                                   \
         libxl__prepare_ao_device(ao, aodev);                            \
+        aodev->action = LIBXL__DEVICE_ACTION_ADD;                       \
         aodev->callback = device_addrm_aocomplete;                      \
         aodev->update_json = true;                                      \
         libxl__device_##type##_add(egc, domid, type, aodev);            \

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#6 lore raw
Quoted 6 lines · Ian Campbell
Quoted 5 lines · Ian Campbell
Quoted 3 lines · Wei Liu

... otherwise when device add operation fails, the error message looks like "libxl: error: libxl.c:1897:device_addrm_aocomplete: unable to (null) device", which is not very helpful.

Quoted 8 lines
Quoted 5 lines

Thanks.

Quoted 2 lines

Konrad, in v1 Wei said "This is a simple enough bug fix I think it should just go in." and I agree.

Nevermind I've just seen the ack which was in the wrong folder here.

Quoted 33 lines
Quoted 18 lines
Quoted 18 lines
Cc Ian Jackson <[email protected]>
---
 tools/libxl/libxl.c |    1 +
 1 file changed, 1 insertion(+)
tools/libxl/libxl.c +1 -0
index f7961f6..de23fec 100644
@@ -4164,6 +4164,7 @@ DEFINE_DEVICE_REMOVE(vtpm, destroy, 1)
                                                                         \
         GCNEW(aodev);                                                   \
         libxl__prepare_ao_device(ao, aodev);                            \
+        aodev->action = LIBXL__DEVICE_ACTION_ADD;                       \
         aodev->callback = device_addrm_aocomplete;                      \
         aodev->update_json = true;                                      \
Quoted 8 lines

tools/libxl/libxl.c DEFINE_DEVICE_REMOVE(vtpm, destroy, 1) · line 4170

Quoted 1 line
tools/libxl/libxl.c +0 -0
         libxl__device_##type##_add(egc, domid, type, aodev);            \

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel