[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 7/8] tools/init-dom0less: Continue on error
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Tue, 26 Aug 2025 17:08:46 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IZbY69DMqrM0tK6H3yhGR3gho187BPnTnu5vuJ1naLY=; b=BlrLlnDuiqg7k/MwdvhIacp2x8vHbS87Juw43zvKjj3FPAShoMEeVeFQgVbwdSk00JvEODK0UmG2nAU9m1tbeWN0DlTg6aVBDZqu611hYHrwMYteVkSUc1jVNoaqY6/7mOC6rF95rkODPACxXJLin/H0XqYEqn1VCt/IWZ7QYvDqfl9VNT9Uwx7gBTV7G9+NuRcJFf3joEWaZyStFBMdsHrL8lTPVd15hcXrzt6dBz1QWNc0PnPSUT2ECAL7e/2jr60F6r7ErPJmcqNc1YK/X82UHXGvMJG88uhB90RRoBvvLAYolD6pVQkpY+sBAjU4wUc3SY4sMiayXjtGFpvcBA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oHySlXxqNmM1s62brizEOcGayhRh+wwqZxdVUg6xXO5PNVjHuSNbzlvkbiWbWZq6BBZexDMHBIyOSmJFS9UF95t5lPFJGWxcw+SEz8/Ly86UaevhMYzN8Ver9M21doiozPOjX2qRy8tZbR8War1UTDykPiJ70Of3/bGLao/kBPGZYtoI7OFKJJQeCNs0U7vrz0kkriEoVb4jsFQCZ5pX3jLUljny5LKGByyBXS+cQc756bQhfyhT3PFa0DRQQ6Ld8Rb+W8quaKVlS9qvLRab4YdO0TVWrtE23VrFUyFAZQFqlset3FLQmsp6WKwdCf1s5C79NDONddxwAuRa/j1kFw==
- Cc: Jason Andryuk <jason.andryuk@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Delivery-date: Tue, 26 Aug 2025 21:09:19 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
An error on one domain doesn't apply to others. Continue the loop over
all domains if init_domain() fails.
There is a mix of positive and negative errors. 0 is success, so just
check for that.
The last rc value is used as the exit value, so clear it before the end.
This avoids a stale rc value indicating failure.
Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
v3:
Use != 0 since there are both positive and negative errors
---
tools/helpers/init-dom0less.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init-dom0less.c
index d08b0b1362..ce70ddee29 100644
--- a/tools/helpers/init-dom0less.c
+++ b/tools/helpers/init-dom0less.c
@@ -406,12 +406,14 @@ int main(int argc, char **argv)
rc = init_domain(&info[i]);
if (rc) {
fprintf(stderr, "init_domain failed.\n");
- goto out;
}
} else {
printf("Domain %u has already been initialized\n", domid);
}
}
+
+ rc = 0;
+
out:
libxl_dominfo_list_free(info, nb_vm);
return rc;
--
2.50.1
|