All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Some misc from my tree
@ 2021-12-27  7:39 Elliott Mitchell
  2020-12-10 23:09 ` [PATCH 5/5] tools/xl: Fix potential deallocation bug Elliott Mitchell
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Elliott Mitchell @ 2021-12-27  7:39 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Anthony PERARD, Juergen Gross

Some bits I had run across when looking at a piece of libxl.

Even though the purpose of the functions suggests they won't modify the
memory passed in via pointer, marking them constant provides better
reassurance.

While list_domains_details() and printf_info() had similar purposes their
interfaces were wildly different.  Make them more consistent.  I was
aiming to turn dump_by_dominfo_list() into a wrapper around
dump_by_config(), but didn't quite get there.

Having the functions named "printf" is wrong.  They are generating output
in a fixed format, there is no control over the format.  That is a write
or dump operation, not a formatted print.

Elliott Mitchell (5):
  tools/libxl: Mark pointer args of many functions constant
  tools/xl: Mark libxl_domain_config * arg of printf_info_*() const
  tools/xl: Rename printf_info()/list_domains_details() to dump_by_...()
  tools/xl: Merge down debug/dry-run section of create_domain()
  tools/xl: Fix potential deallocation bug

 tools/include/libxl_json.h        | 22 +++++++++++---------
 tools/libs/light/gentypes.py      |  8 ++++----
 tools/libs/light/libxl_cpuid.c    |  2 +-
 tools/libs/light/libxl_internal.c |  4 ++--
 tools/libs/light/libxl_internal.h | 18 ++++++++--------
 tools/libs/light/libxl_json.c     | 18 ++++++++--------
 tools/libs/light/libxl_nocpuid.c  |  4 ++--
 tools/xl/xl.h                     | 10 ++++++++-
 tools/xl/xl_info.c                | 34 ++++++++++++++++---------------
 tools/xl/xl_misc.c                |  5 +----
 tools/xl/xl_sxp.c                 |  6 +++---
 tools/xl/xl_vmcontrol.c           | 14 +------------
 12 files changed, 72 insertions(+), 73 deletions(-)

-- 
2.30.2



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

end of thread, other threads:[~2022-04-22 22:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-27  7:39 [PATCH 0/5] Some misc from my tree Elliott Mitchell
2020-12-10 23:09 ` [PATCH 5/5] tools/xl: Fix potential deallocation bug Elliott Mitchell
2021-12-29 17:20   ` Luca Fancellu
2022-01-05 15:05   ` Anthony PERARD
2022-04-22 22:58     ` Elliott Mitchell
2020-12-18  1:42 ` [PATCH 4/5] tools/xl: Merge down debug/dry-run section of create_domain() Elliott Mitchell
2021-12-29 17:19   ` Luca Fancellu
2020-12-18  1:42 ` [PATCH 3/5] tools/xl: Rename printf_info()/list_domains_details() to dump_by_...() Elliott Mitchell
2021-12-29 17:18   ` Luca Fancellu
2020-12-18 21:32 ` [PATCH 2/5] tools/xl: Mark libxl_domain_config * arg of printf_info_*() const Elliott Mitchell
2021-12-29 17:18   ` Luca Fancellu
2020-12-18 21:37 ` [PATCH 1/5] tools/libxl: Mark pointer args of many functions constant Elliott Mitchell
2021-12-29 17:15   ` Luca Fancellu
2022-01-05 10:09   ` Anthony PERARD
2022-01-05 13:09     ` Luca Fancellu

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.