From: Jason Andryuk <jason.andryuk@amd.com>
To: <xen-devel@lists.xenproject.org>
Cc: Jason Andryuk <jason.andryuk@amd.com>,
Anthony PERARD <anthony.perard@vates.tech>
Subject: [PATCH v3 6/8] tools/init-dom0less: Remove use of err()
Date: Tue, 26 Aug 2025 17:08:45 -0400 [thread overview]
Message-ID: <20250826210847.126015-7-jason.andryuk@amd.com> (raw)
In-Reply-To: <20250826210847.126015-1-jason.andryuk@amd.com>
err() is fatal - print a message and exit. We want init-dom0less to
continue on as much as possible, so replace with returning an error.
Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
---
v3:
New
---
tools/helpers/init-dom0less.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init-dom0less.c
index a4de40aeac..d08b0b1362 100644
--- a/tools/helpers/init-dom0less.c
+++ b/tools/helpers/init-dom0less.c
@@ -300,8 +300,10 @@ static int configure_xenstore(libxl_dominfo *info,
rc = xc_dom_gnttab_seed(xch, info->domid, true,
(xen_pfn_t)-1, *xenstore_pfn, 0, 0);
- if (rc)
- err(1, "xc_dom_gnttab_seed");
+ if (rc) {
+ printf("xc_dom_gnttab_seed");
+ return 1;
+ }
}
return 0;
@@ -329,18 +331,24 @@ static int init_domain(libxl_dominfo *info)
xc_domain_sethandle(xch, info->domid, libxl_uuid_bytearray(&uuid));
rc = gen_stub_json_config(info->domid, &uuid);
- if (rc)
- err(1, "gen_stub_json_config");
+ if (rc) {
+ printf("gen_stub_json_config");
+ return 1;
+ }
rc = create_xenstore(info, uuid, xenstore_pfn, xenstore_evtchn);
- if (rc)
- err(1, "writing to xenstore");
+ if (rc) {
+ printf("writing to xenstore");
+ return 1;
+ }
if (!introduced) {
rc = xs_introduce_domain(xsh, info->domid, xenstore_pfn,
xenstore_evtchn);
- if (!rc)
- err(1, "xs_introduce_domain");
+ if (!rc) {
+ printf("xs_introduce_domain");
+ return 1;
+ }
}
return 0;
--
2.50.1
next prev parent reply other threads:[~2025-08-26 21:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 21:08 [PATCH v3 0/8] init-dom0less and dom0less xenstore evtchn Jason Andryuk
2025-08-26 21:08 ` [PATCH v3 1/8] tools/init-dom0less: Make handles global Jason Andryuk
2025-08-27 15:12 ` Jürgen Groß
2025-08-26 21:08 ` [PATCH v3 2/8] tools/init-dom0less: Factor out xenstore setup Jason Andryuk
2025-08-26 21:08 ` [PATCH v3 3/8] tools/init-dom0less: Only introduce un-introduced domains Jason Andryuk
2025-08-26 21:08 ` [PATCH v3 4/8] tools/init-dom0less: Switch domain_exists to check xenstore name Jason Andryuk
2025-08-26 21:08 ` [PATCH v3 5/8] tools/init-dom0less: Use introduced to determine no-enhanced Jason Andryuk
2025-08-26 21:08 ` Jason Andryuk [this message]
2025-08-26 21:08 ` [PATCH v3 7/8] tools/init-dom0less: Continue on error Jason Andryuk
2025-08-26 21:08 ` [PATCH v3 8/8] xen/dom0less: store xenstore event channel in page Jason Andryuk
2025-08-27 7:58 ` Jan Beulich
2025-08-27 13:19 ` Jason Andryuk
2025-08-27 14:00 ` Jan Beulich
2025-08-27 8:03 ` Orzel, Michal
2025-08-27 13:24 ` Jason Andryuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250826210847.126015-7-jason.andryuk@amd.com \
--to=jason.andryuk@amd.com \
--cc=anthony.perard@vates.tech \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.