All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 1/3] libxc: Report EINVAL in invalid xc_resource_op use
@ 2026-03-16 14:34 Teddy Astie
  2026-03-16 14:34 ` [PATCH v9 2/3] xenpm: Use EXIT_{SUCCESS,FAILURE} instead of errno as exit codes Teddy Astie
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Teddy Astie @ 2026-03-16 14:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Teddy Astie, Anthony PERARD, Juergen Gross

xc_report_op doesn't update errno when called with 0 operations
(even though it returns -1).

Signed-off-by: Teddy Astie <teddy.astie@vates.tech>
---
 tools/libs/ctrl/xc_resource.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/libs/ctrl/xc_resource.c b/tools/libs/ctrl/xc_resource.c
index cb6a97202b..f65127f91c 100644
--- a/tools/libs/ctrl/xc_resource.c
+++ b/tools/libs/ctrl/xc_resource.c
@@ -137,6 +137,7 @@ int xc_resource_op(xc_interface *xch, uint32_t nr_ops, xc_resource_op_t *ops)
     if ( nr_ops > 1 )
         return xc_resource_op_multi(xch, nr_ops, ops);
 
+    errno = EINVAL;
     return -1;
 }
 
-- 
2.53.0



--
 | Vates

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech



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

end of thread, other threads:[~2026-03-30 15:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 14:34 [PATCH v9 1/3] libxc: Report EINVAL in invalid xc_resource_op use Teddy Astie
2026-03-16 14:34 ` [PATCH v9 2/3] xenpm: Use EXIT_{SUCCESS,FAILURE} instead of errno as exit codes Teddy Astie
2026-03-30 13:04   ` Anthony PERARD
2026-03-16 14:34 ` [PATCH v9 3/3] xenpm: Add get-core-temp subcommand Teddy Astie
2026-03-30 13:08   ` Anthony PERARD
2026-03-30 15:20     ` Teddy Astie
2026-03-30 13:03 ` [PATCH v9 1/3] libxc: Report EINVAL in invalid xc_resource_op use Anthony PERARD

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.