[DTrace-devel] [PATCH 11/12] Abort if provider population fails for any provider
Kris Van Hees
kris.van.hees at oracle.com
Fri Jan 5 05:31:44 UTC 2024
Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
libdtrace/dt_open.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libdtrace/dt_open.c b/libdtrace/dt_open.c
index c5bbab1a..0be0ce9d 100644
--- a/libdtrace/dt_open.c
+++ b/libdtrace/dt_open.c
@@ -1,6 +1,6 @@
/*
* Oracle Linux DTrace.
- * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
@@ -1208,6 +1208,9 @@ dtrace_init(dtrace_hdl_t *dtp)
int n;
n = dt_providers[i]->populate(dtp);
+ if (n < 0)
+ return -1; /* errno is already set */
+
dt_dprintf("loaded %d probes for %s\n", n,
dt_providers[i]->name);
}
--
2.42.0
More information about the DTrace-devel
mailing list